2 ms·
Vim has the ftplugin (filetype plugin), which makes this easy as pie, and extremely configurable, too. You simply set filetype plugin on then put configu
by slowpoke 14y ago
Vim has the ftplugin (filetype plugin), which makes this easy as pie,
and extremely configurable, too.
You simply
set filetype plugin on
then put configuration files for a filetype into ~/.vim/ftplugin/$filetype.vim
(for example, python.vim, text.vim or even gitcommit.vim).
Within those, you can do things like setting expandtab or the tab/shift width -
they are full local subconfigurations which override your global configuration.
They are usually not very large (5 lines on average for me), but it sure helps
keep things organized and easy to find and change.