i install the vim6.3 in my windows xp, then i download a ksh script named "ftpshell", from the unix server, then i open it with the vim, it works well, but when i open another vim windows, and copy the script content to the new vim, i found that the syntax color losed in the new windows whether or not i save it and reopen it and use the command "syntax on", the only solution is to rename it as "ftpshell.sh",but i don't want to change the name, who can help me? i think there must be a good idea.
Vim supports lexical ("syntax") highlighting for a number of different language forms and identifies each one by the file extension. Without some kind of identifier, vim can't know which highlighting rules to use.
You can either change the name of your file or you can write a rules that reads a file name with no extension as a shell script.
I think it would be easiest to edit a file renamed with a .ksh extension, then copy it back to the original name when you're done.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson