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

Ahg, no I couldn't do that, I need to keep J as Join lines. That's pretty useful to me. Kinda the inverse of gq.


Ah, I bound join lines to :join since I don't use it that often. I still encourage you to try binding something to 7j (or whatever number of j's feels right). One of the best shortcuts of my life.


I tried to use J, but it's somewhat tied to my muscle memory already (and I'm surprised I use it quite often joining comments and stuff). If you're like me, remember that you can abbreviate :join to just :j.

The advantage of using J and K is that they're very vim movements, but if can't because of :join, another workaround would be to use <PageUp> and <PageDown> since they're redundantly bounded to <Ctrl-B> and <Ctrl-F>:

    nnoremap <PageDown> 7j
    nnoremap <PageUp> 7k
    vnoremap <PageDown> 7j
    vnoremap <PageUp> 7k


I use that a lot as well, along with K to look up the current word in the man page.




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

Search: