Luc Hermitte <[EMAIL PROTECTED]> 写于 2006-11-09 16:35:45:
> > Save these commands into your $VIM\vimfiles\after\syntax\matlab.vim
> > (Windows platform)
> > or ~/.vim/after/syntax/matlab.vim
>
> This is not the right place to do that. ftplugins are the right
> solution.
> => ~/.vim/ftplugin/matlab.vim
>
> And BTW, don't use :set, but :setlocal when you want filetype specific
> settings.
>
> --

I don't know if there's any difference between ftplugin directory and
syntax directory.

But I did know that you should use ~/.vim/after/xxx instead of ~/.vim/xxx
if you want to overwrite something existing (here the matlab exists in the
vim standard distribution).

Having a ~/.vim/ftplugin/matlab.vim is good only when the
$VIMRUNTIME/ftplugin/matlab.vim does not exist. If it exists, you have risk
of lose the settings there.

The difference is: if you put into ~/.vim/ftplugin, you will overwrite the
system default, if the system default does something else than set the
options you will lose those settings. so, put into ~/.vim/after/ftplugin
(In my practise it should be ~/.vim/after/syntax) seems to be always a
better choice.


--
Sincerely, Pan, Shi Zhu. ext: 2606

Reply via email to