[TriLUG] Pasting indented text into VI (vim)
Jon Carnes
jonc at nc.rr.com
Wed Mar 22 22:19:52 EST 2006
Found this *very* helpful tip (at least for me) about handling
cut/pastes of formated text into Vim...
http://www.vim.org/tips/tip.php?tip_id=330
Since VIM 6.0 the indent has been improved so much. But sometimes when
we are pasting formated text (source code or HTML etc) into a buffer,
VIM indents again so that lines will be padded with too many spaces.
Setting nocindent, noautoindent, nosmartindent still cannot stop this.
All you need to do is ":set paste", then paste your stuff, and then
":set nopaste" again.
Jon Carnes
More information about the TriLUG
mailing list