Make standard keybindings for "select all" and "copy" work in Vim

2 Points

Kazark Kazark

4 years ago

I believe if these were more common, or even the default, it would reduce the learning curve of Vim in very pleasant ways. Even now, after knowing Vim well, I find the universal CTRL-C and CTRL-A nice.

" I select everything in a file far more than I increment an integer! Why not
" make CTRL-A do what it does in almost every other program?
nmap <C-a> ggVG

" CTRL-C doesn't do anything valuable in Normal mode. Why not map it to what
" it does in almost every other program?
vmap <C-c> "+y

Jacky Alciné

Jacky Alciné 4 years ago

<Ctrl-C> sends an interrupt to Vim, equivalent to pressing <ESC>

Martínez Ortiz Saúl Axel

Martínez Ortiz Saúl Axel 7 months ago

No, it's not equivalente. The only equivalence to ys <Ctrl-[> and is independent