Skip to content

Instantly share code, notes, and snippets.

@scheibo
Created January 12, 2011 02:45
Show Gist options
  • Save scheibo/775602 to your computer and use it in GitHub Desktop.
Save scheibo/775602 to your computer and use it in GitHub Desktop.
How to paste in vim
shift + middle click!
when set mouse=a is on, vim grabs all the mouse action, so in order to let X in on the fun use shift. in order to copy something from one part of the document use shift+highlight, and in order to paste, enter insert mode, toggle paste mode and shift+middle click. Very fun, quite a few steps to get a handle on though.
Alternatively, use 'set mouse=' (no a) to turn the mouse off and then just the X mouse will be functioning in vim. no shift is required, but make sure to still be pasting in insert mode and with paste on (without paste, autoindent ruins your day, without insert mode the stuff you're pasting will be interpreted as commands)
Finally, turn off bullshit flow control with
stty -ixon in your bashrc. Then you can properly get Ctrl+{S,V,X,Z,C} etc working but BE IN COMMAND MODE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment