1

(NB: I've moved this question from another SE site, let me know if thats not ok and I can take this down)

I'm having issues remapping Ctrl+Shift+c to copy visually selected text to the + register. At the moment I have the following in my .vimrc

vnoremap <C-C> "+y

I tried remapping a few other things to similar key bindings to see if it was my implementation or the specific combination of keys that was the issue and it is definitely the key combination (eg vnoremap <C-I> "+y worked and vnoremap <C-C> d didn't).

Any ideas why it doesn't work and how I could possibly remap it?
Cheers

On the first post of this q I was directed towards a previous answer that may possibly relate to my issue. From what I read there is a possibility of both and doing the same thing. I didn't experience this when I tested it 5 minutes ago so any help would be appreciated.

OS Ubuntu 16.04
Vim version 7.4
see pastebin for full output of $ vim --version

1

Instead of writting <c-c> use the key combination Ctrl+vctrl+shift+c to insert the key code in your command. On my setup it gives this:

nnoremap <83> "+y

See my answer here for more details about how to debug a mapping.

  • Just tried that, didn't get anything from <kbd>Ctrl+v</kbd><kbd>ctrl+shift+c</kbd>.. ? Nothing happened until I tried a different key combination. Could it have something to do with <C-C> being the bash equivalent to <C-c>? Atm I have set mouse=a meaning I can't select text with the mouse to copy with <C-C> as per usual. If I :set mouse=r I can copy from vim to clipboard with <C-C> so is it possibly something to do with the mouse setting? – ljden Sep 28 '17 at 14:16
  • 3
    Indeed it is probably a problem with your terminal which intercepts the keycode before sending it to vim. – statox Sep 28 '17 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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