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

List:       vim
Subject:    Re: using settings for certain files only
From:       christopher j bottaro <cjb () cs ! utexas ! edu>
Date:       2003-10-03 22:27:43
[Download RAW message or body]

ok, here's what my .vimrc file looks like now:

[cjb@semaphore puzzler2]$ cat ~/.vimrc
set syntax=enable
set background=dark
set number
set tabstop=4
set nohls
set ic
autocmd!
autocmd BufNewFile,BufRead *.cpp,*.h,*.c,*.c++ set cindent shiftwidth=4

and the cindent works as expected.  but now my syntax highlighting doesn't work...what gives?  =/

thanks,
-- christopher

On Thu, Oct 02, 2003 at 10:59:25PM +0000, Monique Y. Herman wrote:
> On Thu, 2 Oct 2003 17:05:47 -0500, christopher j bottaro <cjb@cs.utexas.edu>
> penned:
> > 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?
> > 
> > thanks, -- christopher
> > 
> 
> I'm not 100% sure of my syntax or usage, but couldn't you do something
> to the effect of 
> 
> autocmd BufEnter,BufNewFile,BufRead *.cpp,*.h,*.c set cindent
> 
> ?
> 
> -- 
> monique
> Please respond to the group OR to my email, but not both.  (Group preferred.)
> 
[prev in list] [next in list] [prev in thread] [next in thread] 

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