Reputation: 33202
If I type the following
void main(int blah,
and then press enter, I want to continue here:
float blah);
How can I achieve this?
Upvotes: 4
Views: 2162
Reputation: 11
The following commands will indent your code the right amount, using spaces rather than tabs and automatically indent after you start. The commands can be added to your .vimrc file.
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent
Source: http://drupal.org/node/29325
Upvotes: 1
Reputation: 3844
I'd suggest you also read up on the smartindent and autoindent settings.
Upvotes: 0