How to share clipboard content with Vim IntelliJ

Tags: vimintellij

For those who use Vim plugin for IntelliJ-based products such as Intellij IDEA, Android Studio, may find an inconvenient way to copy and paste content from a clipboard to the IDE.

We usually use Ctrl+V for pasting a content from a clipboard to the IDE and Vim's also use this key for line selection visual mode. So we want to keep this Ctrl+V for visual mode command.

Vim configurations comes to help, you can define a setting that sharing between vim buffer and clipboard. This means that you can paste content from a clipboard to the IDE or paste content from Vim buffer to other programs.

Let create Vim configuration file.

  • Create new file name for Linux and Mac ~/.ieadvimrc

for Windows _ideavimrc

Put this setting into the file.

set clipboard+=unnamed
  • copy to user home directory

For example C:\Users\aaron

restart your IDE

Enjoy you Vim