[vim] Yank lines
See original GitHub issueIn vim, Y
yanks whole line, but in CodeMirror with vim mode, Y
yanks text from current cursor position to end of line (y$
in real vim).
You can reproduce it in CodeeMirror with vim mode by typing these keys: Yp
. It should paste whole line, below.
Issue Analytics
- State:
- Created 9 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
6.5.6 Copying and Moving Text -- Yank, Delete, and Put
The yy command works well with a count: to yank 11 lines, for example, just type 11yy . Eleven lines, counting down from...
Read more >Vim yanking range of lines - Stack Overflow
The best solution would be to enter "visual mode", by pressing v. And after selecting lines just copy ...
Read more >How to Copy, Cut and Paste in Vim / Vi - Linuxize
Vim has its own terminology for copying, cutting, and pasting. Copy is called yank ( y ), cut is called delete ( d...
Read more >Copy, cut and paste | Vim Tips Wiki - Fandom
Other helpful yanking commands include: yy or Y – yank the current line, including the newline character at the end of the line....
Read more >vim: yank lines by marking section (Example) - Coderwall
vim : yank lines by marking section · In normal mode, go to the beginning of the section that you want to yank....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I actually fixed that in 3126d9df613b03ef831ef73b31c47c967f6c4536.
I’ll just add my tuppence-worth here. I’ve been using vi and subsequently vim for 30 years, and have been using ‘Y’ all that time and find it a bit off-putting to only now have to convert to ‘yy’. I don’t use vim with any special compatibility mode. I guess I fall into the category of people who can figure out how to make it work, but what actually happened was I concluded it was broken due to a limited feature set or bug and just gave up, going back to real vim (inside crouton in this case) - as you can tell from the above link in vim.js. Anyway, up to you what you want to implement, but bear in mind some of us are using vim because we grew up on vi (I still have an original AT&T user manual somewhere, iinm), and so compatibility is of non-zero importance. I guess I have indeed learned some vim-only features, so going back to vi itself would be just as problematic. Still, this is the best implementation in javascript that I’ve seen.