Most active commenters

    ←back to thread

    128 points m4xshen | 12 comments | | HN request time: 1.026s | source | bottom
    1. blahgeek ◴[] No.44022156[source]
    I’ve been using vim for 10+ years. However I honestly don’t see the downside of repeating h or j to move up/down (with the key repeat delay adjusted to a small value). It’s more intuitive than using say 15j, which involves recognizing some number in the screen and then look at the keyboard to type because the upper number row cannot be easily touch typed
    replies(7): >>44022175 #>>44022261 #>>44022263 #>>44022311 #>>44022792 #>>44022889 #>>44023557 #
    2. ryanmcbride ◴[] No.44022175[source]
    I've pretty much always struggled with this too. I have a numpad that I can touchtype easily but if I'm taking my hands off homerow I may as well use a mouse at that point.
    3. fwip ◴[] No.44022261[source]
    Huh, I don't find the number row very difficult to touch type. But then again, I do have long fingers.
    4. rgoulter ◴[] No.44022263[source]
    It's nice to have good tools that are practical for navigating around the text.

    For jumping around what's on screen, I think 'easymotion' ("jump anywhere on screen by pressing two characters") & variations are best in terms of how quickly they let you navigate for how easy it is to use.

    5. rybosome ◴[] No.44022311[source]
    Agreed. I wonder if this is somewhat revealing of the mental processes of the creators.

    To me, if my cursor is a few lines away from another line, the easiest way for me to get there is by either using h/j a few times, or looking at the absolute line number and doing that with gg.

    Relative jumps are only useful to me in macros. Calculating a relative jump myself would 100% pull me out of the flow state where I just want to go up/down a few rows.

    I have no proof of this, but I’d guess that the creator of this pattern didn’t feel the same way.

    replies(2): >>44022443 #>>44023575 #
    6. skydhash ◴[] No.44022443[source]
    The best tip I got, was to rely more on search instead of other kind of movement. Especially when doing a bunch of editing. Things like easymotion/sneak/avy works best when reading/reviewing.

    While I loved multi cursor with sublime. After I moved to Vim, I’ve never needed it. It’s either search~repeat or a macro. Now I’m using emacs, and it’s mostly occur-mode and macro. Grep edit is nice for bigger refactoring.

    replies(1): >>44022455 #
    7. christophilus ◴[] No.44022455{3}[source]
    Why’d you switch to emacs, and do you use evil mode?
    replies(1): >>44022623 #
    8. skydhash ◴[] No.44022623{4}[source]
    Vim is a fine editor, but emacs has better tooling. I got in touch with Emacs while learning Common Lisp, and I got hooked by the extensive capabilities and customization available. Vim is fine for extension, but you have to build most of them yourself.

    I tried evil mode, but it clashes with other keybinding in some places and I got unhappy with it. There's a philosophy conflict there. With vim, you're expected to have a command for an action and then bind it to a key. Your editing workflow is to compose those keys.

    But with emacs, you're more expected to have a view and then a set of actions for that view. The power of emacs comes with how easy it is to integrate all those views together. For a programming workflow, you have the file explorer, the symbol explorer, the search result (single file and all files), the version control, the docs, the compilation|build window, the shell, the project tasks,... all together in the same place and linked to each other. With vim, you have to compose all those with a multiplexer and other tools (with conflicting bindings) to get there. Vim is still better for editing, but Emacs is better for workflows.

    9. mathstuf ◴[] No.44022792[source]
    Also gives me time to plan what I'm going to do once I get there. Or I spot a bug/relevant code snippet along the way.
    10. kiaofz ◴[] No.44022889[source]
    I was the exact same until I started using relative line numbers. Then I can just look at a line and see that it's N lines down and jump there immediately. With j or k repeat I'll often over shoot and then have to go back which is kind of annoying.
    11. eviks ◴[] No.44023557[source]
    You don't need to use the upper row, bind numbers to right thumb modifier + numpad-like uio jkl m,.

    Or instead of 15j use another jump to command that accepts those letters as numbers

    Or have some jump type of command that displays a-z labels 1 per row in the middle and you can jump without numbers and without shifting focus to the gutter

    But yes, the most basic motion will still be more "intuitive"

    12. eviks ◴[] No.44023575[source]
    Why would you ever calculate relative jump yourself instead of having relative line numbers in the gutter?

    And yes, for a few lines it's fine, the plugin has this number configurable.