Intellij IDEA with ideavim. Cannot copy text from another source

27,192

Vim's yank command doesn't yank to the system clipboard by default; it yanks to the unnamed register. You can use the * or + register to access the system clipboard; also see this wiki article for more information. Or just set this option in your ~/.ideavimrc:

set clipboard+=unnamed

This ~/.ideavimrc setting has been supported in IdeaVim since VIM-476 was implemented in version 0.38. If the file does not exist create it in your user/home directory.

Note also that this is all standard Vim behavior; none of it is specific to IdeaVim except for the name of the config file.

Share:
27,192
Supo
Author by

Supo

Updated on July 08, 2022

Comments

  • Supo
    Supo almost 2 years

    I tried to copy text from IDEA with ideavim plugin, using default vim keybindings (y). But this text isn't copied in global buffer and i can paste it only in IDEA.
    How can I use copied piece of text in browser, for example?

  • workflow
    workflow about 9 years
    Awesome! Works great in Ubuntu 14.04
  • Alfred Huang
    Alfred Huang over 8 years
    Great! Thank you master!
  • Laurence Gonsalves
    Laurence Gonsalves almost 8 years
    set clipboard+=unnamed uses the * register, aka primary selection. If you prefer to use register +, aka clipboard, then ``set clipboard+=unnamedplus. You can also set these interactively from the :` prompt to experiment and see what works best for you.
  • SantaXL
    SantaXL almost 5 years
    If you are on Windows and are looking for .ideavimrc, then see stackoverflow.com/a/33404917/6441900
  • caiiiycuk
    caiiiycuk almost 3 years
    On Windows will be C:\Users\YourUserName\.ideavimrc