On 15/01/09 15:04, Cory Echols wrote:
> On Thu, Jan 15, 2009 at 8:46 AM, Frans Grotepass
> <[email protected]> wrote:
>> Sorry, it is set in ~/.vimrc
>>
>> cinoptions is set to ":0,(0". The ( then behaves like follows:
>>
>> blablabla blabla (
>> blablaA
>> with cinoptions set to "" and cindent on, it becomes
>> blablabla blabla (
>> blablaA
>
> If you just have a plain line in your .vimrc for 'set cinoptions',
> then that will apply across all filetypes. The standard way in vim to
> set options for a specific filetype is to create a filetype plugin.
> This is just a simple .vim file in ~/.vim/ftplugin/<filetype>.vim. In
> your specific case, you would want to delete the cindent settings from
> ~/.vimrc and put them in ~/.vim/ftplugin/c.vim. (If you're using
> cindent on C code.)
>
> This is all more fully described under ":he ftplugin"
Actually, indenting option should not be sent in a filetype plugin but
in an indent plugin (and by :setlocal, as someone else said). These
indent plugins are located in <directory>/indent/<filetype>.vim where
<directory> is any of the directories in 'runtimepath' (but don't change
anything in the $VIMRUNTIME tree, that's ONLY for scripts distributed
together with Vim).
Furthermore, the existing indent plugins should already set an
acceptable indenting style, so if you have
filetype plugin indent on
in your vimrc, everything else should be taken care of automagically,
without the need for setting any indent style in your vimrc _or_ for any
user-written plugin script.
Best regards,
Tony.
--
"Today's thrilling story has been brought to you by Mushies, the great new
cereal that gets soggy even without milk or cream. Join us soon for more
spectacular adventure starring ... Tippy, the Wonder Dog."
-- Bob & Ray
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---