[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim
Subject:    Re: using settings for certain files only
From:       Gary Johnson <garyjohn () spk ! agilent ! com>
Date:       2003-10-03 5:37:10
[Download RAW message or body]

On 2003-10-02, christopher j bottaro <cjb@cs.utexas.edu> wrote:
> hello,
> 	i want to use the cindent option when editing .h .c .cpp
> file only.  all other files, i don't want to use that option.
> basically, i want to use different .vimrc files for different file
> types.  how can i accomplish this?

That is essentially what filetype plugins do:  they provide file-
type-dependent initialization files.  You can enable these by
putting

    filetype plugin indent on

in your .vimrc.  See

    :help usr_43.txt

for the User Manual and

    :help filetype.txt

for the Reference Manual.  The filetype plugins that come standard
with vim will probably do just what you want.  If they don't, you
can override some or all of their settings.  See:

    :help ftplugin-overrule
    :help filetype-ignore

HTH,
Gary

-- 
Gary Johnson                 | Agilent Technologies
garyjohn@spk.agilent.com     | Wireless Division
                             | Spokane, Washington, USA
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic