Amir Hossein Hormati wrote:
Hello,
I have trouble with vim 7.0 indenting. I have the following settings in
my vimrc:
set nocompatible
filetype plugin indent on
syntax on
colorscheme transparent
autocmd FileType c,cpp,slang set cindent
set cindent
set softtabstop=2
set shiftwidth=2
set expandtab
set smarttab
set ignorecase
set ruler
set virtualedit=all
set nowrap
set smartcase
set showmatch
set mouse=a
set hls
set backspace=2
set ruler
set incsearch
Although I have cindent set, vim does not indent my code at all when I
am coding c or c++ (.c or .cpp). I searched for this in google and found
nothing. I am using vim 7.0 in linux FC5.
Can anyone help me?
Thanks,
Add the :filetype line as above; then you can remove the autocommand (filetype
indent on takes care of it).
Best regards,
Tony.