quirk of ":set paste"
2014-07-29 17:57:03 GMT
From ":help paste": Put Vim in Paste mode. This is useful if you want to cut or copy some text from one window and paste it in Vim. This will avoid unexpected effects. [...] 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 I can see the usefulness of most of those options, but one that I don't understand, and one that bugs me, is "'ruler' is reset". How does an out-of-band information display about the current cursor position "avoid unexpected effects"? I use autocommands to set textwidth and autoindent settings on posts to Usenet (and private newsgroups). This is very helpful for reformatting text-on-the-fly when pasted from a webpage to (a) maintain a fixed indent to help identify the block quote and (b) keep lines from exceeding 72 columns.(Continue reading)