On 22:15:03 Dec 24, Marc Espie wrote: > vim actually has an internal fmt command. > > I found about it fairly recently. All vi users use the filter command > all the time, and it usually takes us a while to adjust to vim improvements ;)
I have this on my vimrc. sy on se nu se textwidth=72 nnoremap <C-k> :,$d<CR> se spell spelllang=en_us nnoremap <C-F5> :highlight clear spellbad<CR> nnoremap <C-F3> ihttp://sirsasana.org/ports/<ESC>a Setting "se textwidth=72" is the best way. No need to invoke 'fmt'. Check out my other useful stuff too. I have an on the fly spell checker and a short hand for sending ports. ;) vim helps me avoid errors in e-mail messages ( though I keep making typos despite that ;). Also check out the mapping for 'Ctrl-K' which is extremely critical for e-mail. Whenever you reply to a mail on the list, you keep running into the need for deleting everything from current line downwards. As to the preference between vim and vi, I would say that I have kind of got "spoilt" by the luxury of vim. I definitely agree that vim sometimes is a bit slow and that it has bloat that can be avoided, but what the heck? Vim's syntax highlighting never ever let me down. ;) It cannot understand all sorts of #ifdef, so sometimes the bracket matching fails but throw any config file or whatever you think of at it and vim does a marvelous job. Yes, I am typing this mail in vim. I have written an article on vim too. http://linuxjournal.com/8289 I know this discussion is about vi and not vim, but Marc spoilt me. ;) -Girish