No subject
Wed May 7 10:49:10 NZST 2008
-=- cut here -=-
When the 'paste' option is switched on (also when it was already on):
- mapping in Insert mode and Command-line mode is disabled
- abbreviations are disabled
- 'textwidth' is set to 0
- 'wrapmargin' is set to 0
- 'autoindent' is reset
- 'smartindent' is reset
- 'softtabstop' is set to 0
- 'revins' is reset
- 'ruler' is reset
- 'showmatch' is reset
- 'formatoptions' is used like it is empty
-=- cut here -=-
:set nopaste
re-enables the things which were disabled.
I routinely use vim through ssh connections, and have always used :set
paste/:set nopaste around them, and it works just fine. Just disabling ai
on the otherhand will catch you out in oh so many ways (eg, word wrapping).
For advanced users you might want to bind a key to :set paste, and :set
nopaste to make it easier to deal with. See the vim help for how you can
do this.
As I said in my earlier message you don't even need to do that with
gvim, because it recognises the paste X event separately from typing,
and hence handles it properly. However, I use vim almost exclusively,
because my world is lots of xterms and ssh connections...
Ewen
More information about the wellylug
mailing list