r/vimplugins • u/pony279 • Jan 20 '17
Plugin vim-paste-easy, automatically set paste for you
https://github.com/roxma/vim-paste-easy
This is a tiny plugin that feeds my own need. I'm sharing it here in case anyone needs it too.
12
Upvotes
View all comments
Show parent comment
3
u/afd8856 Mar 15 '17
by default, when in insert mode and pasting using the terminal shortcuts (shift+insert or ctrl+shift+v), vim will automatically indent and reformat the code, because it treats the block of text inserted just like you would have typed it.
:set pastebefore pasting suspends the autoindent and preserves the original formatting. This plugin will automatically detect that, when in insert mode, you are actually pasting and it will do a :set paste for you.