Remap Y to yank to end of line, like neovim
dblume

dblume commited on 2024-03-12 15:24:36
Showing 1 changed files, with 3 additions and 0 deletions.


Use yy to yank a whole line.
Like C and D work from current position to the end of the line,
use Y to yank to the end of the line too.
... ...
@@ -49,6 +49,9 @@ nnoremap <cr> :noh<cr><cr>
49 49
 nnoremap <Tab> :bp<cr>
50 50
 nnoremap <S-Tab> :bn<cr>
51 51
 
52
+" Use yy to yank a whole line, use Y to yank to end of line like C and D
53
+nnoremap Y y$
54
+
52 55
 syntax on
53 56
 
54 57
 set t_Co=256
55 58