# What happens when you press
insert in Vim?
insert is a very useful hotkey to paste from clipboard. But when you are trying to do the same in Vim, you can only get
<S-Insert> instead of something you copied.
It is very annoying, right?
# How to fix it?
- Open you
.vimrcwhich is usually under your home directory.
prompt> vim ~/.vimrc
- Just add below lines into your
.vimrcfile so that you map
map <S-Insert> <MiddleMouse> map! <S-Insert> <MiddleMouse>
insert can work as expected to past from clipboard!
# What does
map command creates a key map that works in normal, visual, select and operator pending modes.
map! command creates a key map that works in insert and command-line modes.
So you need to define both of them to make
insert work under every modes.
Thanks for reading. Hope it is useful to you!