Hacker News new | past | comments | ask | show | jobs | submit login

ctrl-k ctrl-y ?



Not quite the same. For instance, to duplicate a line in Emacs you have to go to the beginning of the line, kill it and then yank twice, and it doesn't even work always, particularly at the end of a buffer. In vi, it's just yyp. No corner cases.


I've been using emacs for a long time. When I duplicate a line I don't even know that I'm following the steps you mention, I just do it on autopilot.

What I like most about emacs though is that I rarely have to do repetitive tasks because I can write a bit of lisp code to do them instead.


Or you can go to the beginning of the line, press Control-space (set mark), press Control-e (end of line), then Meta-W (copy), and Control-y (paste).


Just to share experience, i've recorded Macro named dup-line and bind to `C-M-y`. And find it very handy :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: