15

Couldn't find the simple solution on SO, so thought I would add this here for anyone looking in the future.

My symptom was that I could copy and paste within the IJ editor, but not from the editor to another application or from another app to the editor.

This was on Windows 10 with IntelliJ IDEA 14.1.6.

1
  • I don't know if this will work with other situations. Here is my story: I tried to copy sql query from Dbeaver to goland and it was not pasting into the editor. But when I copy same the text from dbeaver to other place (as a example here: dpriver.com/pp/sqlformat.htm) and then again copy it from the other place only then I am able to paste into the goland iDE Sep 8, 2021 at 15:13

7 Answers 7

15

I have found the best solution yet (for me in any case). I have tried everything! Including adding and removing Keymap options. And this is actually where the problem lies...sort of.

When you have the Vim plugin installed, Ctrl + c and Ctrl + v is allocated to Vim.

To change that, go to Setting>>Other Settings>>Vim Emulation and set the Handler to IDE. Apply and OK, and Voila!

enter image description here

1
  • 1
    Yes, this fixed it for me. In 2021.1.2 these settings are under Editor > Vim, but everything else is identical still... I can't believe they haven't solved this problem over the last 4 years
    – pixelpax
    Jun 9, 2021 at 19:00
14

My solution (thanks to a similar issue reported with Android Studio) was to run IntelliJ as an admin.

Steps to always run IntelliJ in admin mode:

  1. Right-click on IntelliJ icon in start menu search (or wherever you started it) -> Open file location
  2. Right-click IntelliJ shortcut -> Open file location (yes, again to get to the .exe, not the shortcut.)
  3. Right-click idea.exe -> Properties
  4. Compatibility tab -> check Run this program as an Administrator
  5. Right-click idea64.exe -> Properties (if you run IntelliJ in 64 bit mode)
  6. Compatibility tab -> check Run this program as an Administrator
4
  • Solved it for me, but I'm a little concerned that I needed to give any application admin rights to use copy/paste functionality. It didn't feel comfortable opening up permissions like that.
    – Jeremy
    Aug 19, 2016 at 9:33
  • @Jeremy I completely agree. This is definitely not an ideal solution, but it happens to work. This is a known bug in several flavors of IntelliJ. Last time I checked the issue, it sounded like they would be rolling out a fix in an upcoming build.
    – Jeff Neet
    Aug 22, 2016 at 5:05
  • Should not be marked correct imo. See the answer by @onmyway, the issue is overzealous Vim emu. This is needless/dangerous elevation of privileges
    – pixelpax
    Jun 9, 2021 at 19:02
  • @pixelpax agreed Vim emu can be the culprit, but I didn't have any Vim plugins installed. The ideal fix is running a version without this bug. But this is an immediate solution if that's what is required.
    – Jeff Neet
    Aug 24, 2021 at 5:10
3

Same problem drove me completely insane but this https://www.quora.com/Why-doesnt-Ctrl+V-and-Ctrl+C-work-in-IntelliJ-IDEA-14-0-2-on-Linux worked for me:

You might try Ctrl+INS for copy and Shift+INS for paste and see if they work. They are the traditional cut and paste and have been around a lot longer than Ctrl+c/Ctrl+v.

i don't know why, but this worked!

2

To make copy/paste through shortcut keys working with Vim Plugin you need to change some settings of Intellij IDE's editor regarding vim emulation, you need to follow these steps for it:

  1. Click Menu File > Settings... (or use shortcut Ctrl + Alt + S)
  2. Select Editor -> Vim Emulation and find the shortcuts and change their Handler column value to IDE as shown in the screenshot below.

enter image description here

The Shortcuts will start working, happy coding :)

1

Another solution i've found https://code.google.com/p/android/issues/detail?id=173201 was:

Try to minimize Idea window and move it on the same monitor where is the code that you want to copy and paste it. After this small minimize and move exercise the clipboard starts working.

Ctrl-Shft-V starts working after this for me!!!!!

1
  • I have the same problem in WebStorm which is a related product. The problem appears intermittently, don't know why. What I've done is restart WebStorm and that seems to help but is very distracting for the flow of programming.
    – Panu Logic
    Aug 9, 2018 at 18:26
1

Try to enable "Use national layouts". Settings- Keymap.

For some reason it worked for me.

0

PyCharm - Setting>>Vim Emulation Set - Control + V/P/A to IDE

1
  • This answer adds nothing over the existing answers.
    – Miles Rout
    Nov 19, 2019 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.