[TriLUG] Vim '#' character issues

Alan Porter porter at trilug.org
Thu Feb 2 10:32:41 EST 2006


Brian Weaver said the following:

>I need some sage advice from any VIM experts out there. I *once* knew
>how to prevent vim from reindenting lines that started with the '#'
>character. I've lost that small bit of knowledge and now it's driving
>me nuts.
>


My ~/.vimrc is below.  See the part in the middle.




" save backup files~ to $HOME/.backup
" but don't freak out if $HOME/.backup does not exist
set backup
set backupdir=~/.backup,.

" under no circumstances should you auto-indent
set nocindent
set nosmartindent
set noautoindent
set indentexpr=
filetype indent off
filetype plugin indent off

if !exists("autocommands_loaded")
  let autocommands_loaded = 1

   " but you SHOULD do syntax highlighting if possible
   autocmd Filetype * syntax on

   " custom colors for syntax highlighting
   autocmd Filetype * highlight Comment ctermfg=green

endif





Alan




.




More information about the TriLUG mailing list