Home  >  Q&A  >  body text

vimrc - How to set Ctrl+V in Vim/Vi to be system paste in insert mode and column editing in normal mode?

Currently, I use Ctrl+V to paste from the system to vim relatively frequently, but there is a problem with this. The column editing function is lost in normal mode. How to set Ctrl+V to paste in the system in insert mode and normal mode? What about column editing? (Although Ctrl+Q is also satisfactory, I would like to know similar setting methods)

我想大声告诉你我想大声告诉你2712 days ago651

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 16:38:59

    The solution you want
    inoremap <C-V> <C-R>+

    But this will automatically use autoindent to force indentation. A better solution is to temporarily turn off the paste option
    For details, please refer to autoload/paste.vim

    reply
    0
  • Cancelreply