Skip to content

Commit

Permalink
Fix ctrl+c on laptop / wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
mgunyho committed Feb 14, 2025
1 parent aede2d1 commit 9b0bf35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ command -nargs=* -complete=file Tabe tab drop <args>
" Map ctrl+c to "copy to OS buffer" in visual mode
" from https://sharats.me/posts/automating-the-vim-workpl
xnoremap <C-c> "+y
if !has("clipboard")
" also make it work on wayland
" from https://old.reddit.com/r/Fedora/comments/ax9p9t/vim_and_system_clipboard_under_wayland/
xnoremap "+y y:call system("wl-copy", @")<cr>
xnoremap <C-c> y:call system("wl-copy", @")<cr>
endif

"""""""""""
" PLUGINS "
Expand Down

0 comments on commit 9b0bf35

Please sign in to comment.