I am trying to expand the functionality of these three commands (y, c, d), so I will have the contents both in the system clipboard ("+ case") and in normal registers.
This is what I came up with so far:
nnoremap Y y$v$"+y$
nnoremap yy 0y$0v$"+y$
vnoremap y ygv"+y
" ------
nnoremap C y$v$"+c
nnoremap cc 0y$0v$"+c
vnoremap c ygv"+c
" ------
nnoremap D y$v$"+d$
nnoremap dd 0y$0v$"+d$
vnoremap d ygv"+d
" ------
And I have a few problems with this display:
- For some odd reason, I need to provide my .vimrc resource before I can use these new bindings. Trying to use only nmap, vmap, or even a card just didn't work at all.
- When I try to wring (for example) several lines (for example, 2yy), it turns the text into a "normal" case ("0"), as expected, but only takes up the first line in the system clipboard.
- I could not find a way to create this behavior for y, c and d in normal mode.
- ?
, , , vim script -fu - , , .