[slim-vim] The "right" way of doing file specific things in vim

Daniel Trstenjak Daniel.Trstenjak at online.de
Sat Aug 5 02:56:22 CDT 2006


Hi Brad,

I looked in the implementation of ecl-slime.vim and saw
the autocommands for loading a lisp file.

I don't know if you are aware of the vim filetype plugins ?

The filetype plugins in vim are used to do specific
stuff when loading files of a specific type.

What is done when loading a lisp file can be 
seen in "vim-runtime-path/ftplugin/lisp.vim".

When you want to do more than in the vim standard
filetype plugin you can put an own filetype plugin
in "$HOME/after/ftplugin/lisp.vim". This one
will be loaded after the standard one.

To activate filetype plugins you have to put
"filetype plugin on" in your vimrc.

The same is also available for indentation:
"vim-runtime-path/indent/lisp.vim"

To activate the indentation:
add "filetype indent on" in your vimrc


Regards,
Daniel


More information about the slim-vim mailing list