Amir Hossein Hormati wrote:
A.J.Mechelynck wrote:
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.
I did it, nothing is changed. I realized that the indenting works for
files other than .c and .cpp(for example for html files, it works
perfectly), but it does not work for C and C++ files. I checked my
VIM_HOME/indent directory. Everything seems fine there.Any other
suggestion?
Amir
I don't know, so I'm sending this back to the list.
Note: Next time, please use "Reply to List" (if your mailer offers that
possibility) or "Reply to All" rather than "Reply to Sender". Sending your
reply to the list gives more people a chance to help you ;-)
Best regards,
Tony.