Possible Duplicate:
Aliasing a command in vim
So I have to edit waf wscript files a lot . Everytime I execute this command to set the filetype
set filetype=python
is there a way to set up an small alias for the above command ? SO that I can just go in EX mode and type “py” which does the same thing.
If I have understood correctly your question, the following added to your
.vimrcshoud workIf it is a particular filename like
wscript, this works too:If you can’t rely on an extension or filename you can add a modeline at the top or bottom of your file
See
:help modelinefor more information.But it is kinda ugly because you have to modify the file, and if your are working in a team, it can be problematic.