[lug] vi/eclipse copy and paste indent issue

Ted Logan ted.logan at gmail.com
Thu Aug 27 12:03:39 MDT 2009


On Thu, Aug 27, 2009 at 12:00 PM, Jeffrey
Haemer<jeffrey.haemer at gmail.com> wrote:
> Vim's ":set paste" is an easy-(for me)-to-remember alternative.
> Also take a look at ":help pastetoggle", which may give you a way to flip
> back and forth that you like better than typing ":set ai"/":set noai".
> These are personal taste, so TIMTOWTDI and YMMV.

:set paste actually does more than just turning off auto-indent. It
turns off all code-formatting options; from the online help in my
version of vim (7.1):

        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
        These options keep their value, but their effect is disabled:
                - 'lisp'
                - 'indentexpr'
                - 'cindent'

-- 
Ted Logan
ted.logan at gmail.com
http://jaeger.festing.org/



More information about the LUG mailing list