My terminal is 160 characters wide.
I use VIM.
Is there a way to tell vim:
when you see "//", autoindent it to start @ width 80?
(And haave it also affected when I highlight a region and hit =)
Thanks!
My terminal is 160 characters wide.
I use VIM.
Is there a way to tell vim:
when you see "//", autoindent it to start @ width 80?
(And haave it also affected when I highlight a region and hit =)
Thanks!
Set the following line in your .vimrc file.
set autoindent
set textwidth=80
You might want to see about :filetype indent plugin on
You may also want to look at this plugin: http://www.vim.org/scripts/script.php?script_id=294
Generally, it sounds like a bad idea to arbitrarily indent comments that far in. Usually comments should be on the same indentation as the code, or just after the code if it is on the same line.
If you're really sure this is what you want to do, you could make a mapping or an abreviation:
:iab // <ctrl-o>80i<space><esc>A//<space>
or
:imap // <ctrl-o>80i<space><esc>A//<space>