[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-04 18:36:30
[Download RAW message or body]

thanks for the reply.  it didn't quite work, but it lead me in the right direction to getting it working.  here's what i did:

[cjb@semaphore cjb]$ cat .vimrc
set background=dark
syntax on
set number
set tabstop=4
set shiftwidth=4
set nohls
set ic
filetype indent on

now it seems to be working well...=)

thanks for all the help,
-- christopher

On Sat, Oct 04, 2003 at 01:12:34PM +0200, J?rgen Kr?mer wrote:
> Hi,
> 
> christopher j bottaro wrote:
> > ok, here's what my .vimrc file looks like now:
> > 
> > [cjb@semaphore puzzler2]$ cat ~/.vimrc
> > set syntax=enable
> 
> with this line you tell VIM to use the syntax of the 'enable' language.
> Unless there really is such a language you probably wanted to say
> 
>   syntax on
> 
> > set background=dark
> > set number
> > set tabstop=4
> > set nohls
> > set ic
> > autocmd!
> > autocmd BufNewFile,BufRead *.cpp,*.h,*.c,*.c++ set cindent shiftwidth=4
> 
> Here you setup your own kind of filetype detection scheme. You can take
> advantage of VIM's one by replacing the last two lines with
> 
>   filetype on
> 
> In the case of C and C++ files this would source the default filetype
> plugins, which already set cindent. To set the shiftwidth option to 4
> you then would create (or supplement) your own filetype plugins,
> ~/.vim/after/ftplugin/c.vim and .../cpp.vim, respectively, with the line
> 
>   :set shiftwidth=4
> 
> Regards,
> J?rgen
> 
> -- 
> Sometimes I think the surest sign that intelligent life exists elsewhere
> in the universe is that none of it has tried to contact us.     (Calvin)
> 
[prev in list] [next in list] [prev in thread] [next in thread] 

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