Skip to content

Instantly share code, notes, and snippets.

@RobertAudi
Created July 28, 2014 08:46
Show Gist options
  • Save RobertAudi/11ffa90f4952e5923ce7 to your computer and use it in GitHub Desktop.
Save RobertAudi/11ffa90f4952e5923ce7 to your computer and use it in GitHub Desktop.
System clipboard support in IdeaVim
nnoremap yy "+yy
vnoremap y "+y
nnoremap p "+p
vnoremap p "+p
nnoremap P "+P
vnoremap P "+P
@floer32
Copy link

floer32 commented Mar 2, 2021

I was fiddling with these settings and noticed a difference between the way above, and the set clipboard+=unnamed way. The latter will make it so all yank operations yank to system clipboard, including x/X. For me, that's undesirable, because I don't want single characters copied to the system keyboard one at a time (as with x, without a selection). But doing the remaps for p/y/d and related, were exactly what I was looking for.

Both ways are valid, just depends on what you're after

@tindzk
Copy link

tindzk commented Nov 7, 2023

The nnoremap/vnoremap workaround does not seem to be required anymore. When I configure set clipboard+=unnamed, neither x nor d copies the content to the clipboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment