In Visual Studio Code Ctrl+V is not working
Visual Studio-CodeCopy PasteVscode SettingsCtrlVisual Studio-Code Problem Overview
In Visual Studio Code Ctrl+V
is not working on editor.
However from the command palette Ctrl+Shift+V
is working.
Visual Studio-Code Solutions
Solution 1 - Visual Studio-Code
I´ve had this problem when I enabled the "VIM" plugin for VSCode.
After uninstalling it, the problem was fixed.
Solution 2 - Visual Studio-Code
Open the keyboard shortcuts preferences by pressing CTRL + SHIFT + P and search for open keyboard shortcuts file.
Then, search for the editor.action.clipboardPasteAction property. In your case, it might be CTRL+SHIFT+V. Try changing it to Ctrl + V. Like so:
Solution 3 - Visual Studio-Code
@WebD'is answer is very helpful and I have upvoted it. But my comment focused on whether there was a conflicting binding for CTRL-V and how to find it. You can literally type "Ctrl+V
" (note the "plus+" sign, not a hyphen) and it will find all keybindings that use that binding in whole or part. I suggest that there must be a something else also bound to CTRL-V.
Since this original answer, vscode introduced another way to see what other commands might be bound to given keystrokes. With the Gear/Keyboard Shortcuts file open click on the little keyboardy icon to the right (or Alt+K with this file open) and it will indicate Recording Keys
next to it. Now you can literally press Ctrl+V (or whichever keybinding you are interested in) and those corresponding commands, if any, that use that keybinding will be filtered up.
Remember to disable the Recording Keys
functionality by clicking the keyboardy icon if you want to go back to regular searching in the Keyboard Shortcuts file.
Solution 4 - Visual Studio-Code
If you install the vim extension for visual studio code and find that ctrl + x, ctrl + v .. or other shortcuts stopped working, this is because they are overwritten by extension.vim_
If you prefer to get those shortcuts back go to keyboard shortcuts (ctrl + shift + p, then search for open keyboard shortcuts file).
- Search for extension.vim_ and check too see if any shortcuts are assigned to your key combination like ctrl + v. Remove it (right click, delete).
- Also check for any other conflict by searching the file.
- Save the file, it should work now.
Solution 5 - Visual Studio-Code
I have the same problem: can't CTRL+X, CTRL+C, CTRL+V on VSCode editor. I uninstall the Vim extension and the problem is fixed.
Solution 6 - Visual Studio-Code
For future searchers who do not have Vim (or any other extension) installed which is causing the issue, and who might have verified that their keyboard bindings are correct....
I have the Salesforce Extension Pack installed and had right-clicked on a file and run SFDX: Deploy Source to Org. The deployment had errors, so in the Panel area (which I have at the bottom of my screen) [see image] I had clicked on both the OUTPUT and PROBLEMS tabs, which shifted focus away from my PowerShell TERMINAL tab.
My Ctrl-V
issue was when I was trying to correct my Apex code in the EDITOR pane. Ctrl-V
was not pasting the code I had just Cut or Copied (but right-clicking and choosing Paste was working).
I ultimately discovered, when I changed my Panel focus back to my PowerShell TERMINAL tab, that ALL of the Ctrl-V
pasting I had attempted had shown up after my PowerShell prompt! ["circled" in blue in image]
tl;dr
Make sure your pasted text did not show up in your TERMINAL - even if it is not in focus or even if your cursor is in another Panel tab or in the EDITOR.
Solution 7 - Visual Studio-Code
If you have the Vim extension installed, you may set the vim.useSystemClipboard in the vim extension setting to true. Then you can paste the content from the clipboard by simply pressing p in the NORMAL mode, or use Ctrl+V in the INSERT mode.
Solution 8 - Visual Studio-Code
This problem happened to me after I left VSC update itself (currently 1.53.0). It had been converted to Shift-Insert.
Go to File->Preferences->Keyboard shortcuts. Find the editor.action.clipboardPasteAction
and double click it, then type Ctrl+V.
Solution 9 - Visual Studio-Code
From File
> Performance
> Keyboard Shortcuts
> search paste
> just try to remove or rest some keybinding
with right click on paste
or default:paste
Solution 10 - Visual Studio-Code
+1 for this - in case this helps anyone:
In my case it was only happening in the Thunder Client extension's text fields.
The culprit for me was the Indent on Paste extension (I'm on a Mac, so it was cmd+v instead of ctrl+v - but it fires the same event in VS Code).
I've left issue comments on the Thunder Client and Indent on Paste repos respectively, should anyone wish to add to those.
Solution 11 - Visual Studio-Code
Look if and remove any VS Code extension : for example - "Awesome Emacs Keymap" in my case, or any other keymaps installed.
i.e. : FILE/Preferences>/extensions and then look if any special keymap was installed
Solution 12 - Visual Studio-Code
For me the solution was going through my extensions and disabling them one by one to find the culprit.
I had 'Paste and Indent' enabled which was messing up copying and pasting.
Just had to disable it and reload vs code.
Solution 13 - Visual Studio-Code
Modify the setting of vscode: Settings - input:vim ctrl key - unselect: Enale some vim ctrl key commands that override otherwise common operations, like ctrl + c
Solution 14 - Visual Studio-Code
go to extensions search Emacs keymap and uninstall it
Solution 15 - Visual Studio-Code
There should something conflicting to your any previous keyboard shortcut like in my case for Change All Occurrence: (Ctrl-C + Ctrl-A), vs code, confused with Ctrl-C for a copy shortcut to this : (Ctrl-C + Ctrl-A), so I change this to (Shift-C + Shift-A), My Issue resolved.
Solution 16 - Visual Studio-Code
Go to File>Preference>keyboard Shortcuts Then Check for Copy and paste and enter the Ctrl+C and Ctrl+v shortcuts
Happy Coding ;)
Solution 17 - Visual Studio-Code
None of the issues above solved this for me. I had a key binding Ctrl+C Ctrl+L. So when I pressed Ctrl+C it was in a state where it was waiting for the next key to be pressed and wouldn't do anything.
This showed up in the toolbar like so (an example):
This didn't come up in the list of keybindings when searching for Ctrl+C. So I found it be looking through the list.
Solution 18 - Visual Studio-Code
Remove all cmd+v
or in windows ctrl+v
associated keybindings.
Solution 19 - Visual Studio-Code
i have same problem step:1
ctrl+shift+p
step:2 find
Open keyboard shortcuts
step:3
find paste
then you can see
editor.action.cliboardPasteAction
-
right click then changekeybinding if key wrong
-
or remove key if u found two same line(editor.action.cliboardPasteAction)
in my case is 2nd one(so i removed)
Solution 20 - Visual Studio-Code
In some cases, if you use remote ssh connects to a remote server and code there, ctrl + V may not be useful because that your remote server has a high balance, you can try to uninstall some useless plugins in that remote server then reload vscode.
Solution 21 - Visual Studio-Code
Open Settings > keyboard shortcuts
Search for Ctrl + c
Delete the mapping for vim.
Solution 22 - Visual Studio-Code
I have disabled all extensions, and VS Code hangs for a few seconds whenever I try to paste something. This occurs with Ctrl+V, Shift+Ins and also with right click + Paste.
It hangs, and then nothing happens.
[UPDATE] I simply reinstalled it, and that solved the issue for me.
Solution 23 - Visual Studio-Code
In my case just the relaunch of VSCode solved the issue. My key bindings were fine.