Why is pasting a long one-liner very slow in Vim's insert mode?

后端 未结 9 1131
别那么骄傲
别那么骄傲 2020-12-23 14:35

My Macbook was stuck yesterday, when I tried to paste 1200 lines of 80 characters to Vim. It was much faster to download the file, and not to paste the text.

I have

9条回答
  •  遥遥无期
    2020-12-23 15:18

    But if it's on the web, you should have tried:

    :e http://link/to/file 
    

    Then if necessary save it as a local file.

    And if it's slow because of the redrawing, look at this option:

                *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'*
    'lazyredraw' 'lz'   boolean (default off)
                global
                {not in Vi}
        When this option is set, the screen will not be redrawn while
        executing macros, registers and other commands that have not been
        typed.  Also, updating the window title is postponed.  To force an
        update use |:redraw|.
    

    And if it's a local file, then pasting is not necessary: try

    :read file 
    

    instead.

提交回复
热议问题