question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In 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:closed
  • Created 9 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
adrianheinecommented, May 28, 2017

I actually fixed that in 3126d9df613b03ef831ef73b31c47c967f6c4536.

1reaction
davidmaxwatermancommented, Sep 29, 2014

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found