woensdag 23 mei 2007

some helpful vim tips

Hi,

In this blog I want to show a few helpful tips about vim, that you can use in my tutorials about vim scripting in python

first of all
everyone should know the help command!
:help somecommand

syntax highlighting on in console
:syn on

set commands based on filetype
first set
:filetype on
now, vim will try to recognize the type of file you are editing,
then you can use
au FileType python source /path/to/python/commands

au, automatically execute on event
source, read the source file with commands

execute command from .vimrc without having to press enter
:someCommand()^M
and ^M you have to enter by typing <ctrl-v><ctrl-m> (so pressing those combinations)

Geen opmerkingen: