I'm fairly new to vim (I'm using nvim) so forgive my lack of knowledge, many questions are similar to mine, but not quite the same.
I would like this:
vimby default should cut/copy to a buffer, not system clipboard.vim's other register (I think its+, please correct me if its*!) should go to the system clipboard.
I have done some research but nothing (so far) is working for me.
Info:
- I use
tmuxso pushing totmuxbuffers. - I'm away from home, so currently using
termuxsotermux-clipboard-get/set
Here is what I thought would work in my case:
let g:clipboard = {
\ 'name': 'TmuxTermux',
\ 'copy': {
\ '*': ['tmux', 'load-buffer', '-'],
\ '+': ['termux-clipboard-set'],
\ },
\ 'paste': {
\ '*': ['tmux', 'save-buffer', '-'],
\ '+': ['termux-clipboard-get'],
\ },
\ 'cache_enabled': 1,
\ }
Now when I cut/copy, tmux buffers share vim's content, PERFECT! (almost...),
I cannot use the + buffer to use the system clipboard though, if I press '+' its just moves my cursor down by one line, if I swap the above order (make termux-clipboard-get/set the * register, instead of +), when I press * it highlights all instances of the word my cursor is on.
From reading, I expected:
- By default,
vimuse*register, this seems to be true as it successfully registers totmuxbuffers withdd/yyand pastes withp(or intmuxwith my bind of[PREFIX]+[p] - If I want to cut/copy/paste to my other register
+(system clipboard), then I would use+dd/+yyand then paste with+p(or even*dd/*yy/*p) but this isnt working for me.
Problem:
As explained above, + will move my cursor down one line, when changing it to the * register, * highlights the current word and any other occurance of it
Apologies to those with more experience, I'm fresh from emacs (with a very sore pinky finger!:)