Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nicely illustrated tutorial, well done.

One thing to note though: Y and yy are not shortcuts to 0y$ -- the latter does not yank the line ending. I use it to insert one line into another, but find splitting and joining lines to be cumbersome.



The defualt mapping of Y is arguably broken since it doesn't follow the normal vi conventions. I have these lines in my .vimrc to "fix" it:

    "make shift Y behave like shift-[cd] (copy to end of line)
    nnoremap Y y$


Y being a synonym for yy is from vi. What you mean to say is that it doesn't fit the pattern D/dd and C/cc present.


Thanks, I corrected this.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: