[TriLUG] Vim '#' character issues

Brian Weaver cmdrclueless at gmail.com
Thu Feb 2 10:36:04 EST 2006


Yeah, but I happen to like 'smartindent' and use it a lot. I know this
can be solved without turning off indentation.

Drat!

On 2/2/06, Alan Porter <porter at trilug.org> wrote:
> 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
>
>
>
>
> .
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list