mthread wrote:
> Hi,
> I am using vim to write c++ code. How do I disable/enable auto-
> indentation and auto-comments(ie it automatically adds '//' when I
> move from one line to the other).
>
To disable autoindentation, use:
:set noautoindent | set nosmartindent | set nocindent
To re-enable auto indentation, just re-set the type of indent you would
like to use.
To en/disable automatic comment continuation, use:
:set formatoptions-=c
Your indent settings are normally governed by the scripts in your
$VIMRUNTIME/indent , ~/.vim/indent (or, on Windows, ~/vimfiles/indent)
and sometimes by a filetype plugin.
For more info, see
:help C-indenting
:help autoindent
:help smartindent
:help 'formatoptions'
:help fo-table
:help formatting
--
[ Albie Janse van Rensburg ~ http://morph.telspace.co.za ]
A good scapegoat is hard to find.
A guilty conscience is the mother of invention.
-- Carolyn Wells
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---