What does HackerNews think of vim-easymotion?

Vim motions on speed!

Language: Vim script

#5 in Vim
Hm - I can't see how this is functionally significantly different than EasyMotion[1] or Sneak[2]. Not a knock on it - just curious if I'm missing something.

My problem with these types of plugins is that, although it's a bit more annoying to type out a few more characters, with my vanilla Vim workflow I can pre-compute the motions in my head - I can figure out I need to type d7l or whatever way before I get to the point in my editing where I need to, and as I'm typing it out I'm already thinking about what I want to do next. With sneak, easymotion, or leap, it looks like I can't actually figure out what keys I need to press to get to where I want until I've already started the motion. That means I need to take some time to read the label, etc. So maybe I've saved a few milliseconds of not having to type one or two more keys, but I lose that and more by having to parse what to do.

Curious about other experiences and if I'm off base though.

[1]: https://github.com/easymotion/vim-easymotion [2]: https://github.com/justinmk/vim-sneak

I used to use this method until I tried out easymotion, which really does live up to its name.

https://github.com/easymotion/vim-easymotion

I do use a tiling WM (i3). I was specifically referring to the easymotion[0]-like navigation shown in the video.

What annoys me most about windows is, that you have to resort to using the mouse for many things, and selecting things using something like easymotion seems powerful.

[0] https://github.com/easymotion/vim-easymotion

> I’m not really sure what you’re getting at.

I'm disagreeing with your assertion that "it's logically almost certain that a good trackpad is more efficient than any combination of keyboard shortcuts".

I thought you were talking about moving the cursor to a general area of the screen, not within the context of a text buffer, but there I still think using the keyboard for motion is more efficient once you build up the muscle memory for it. There are plugins like vim-easymotion[1] that make this faster, but I've found plain motion bindings to be efficient enough for me.

In any case, my intention wasn't to dismiss your personal preference, so apologies if it came out like that. At the end of the day we all have a specific workflow we prefer for whatever reason, and that's fine. I just objected to the general statement that a trackpad is more efficient.

[1]: https://github.com/easymotion/vim-easymotion

You don't have to click down multiple times. If you want to go somewhere specific there are too many ways to list tbh but they're all faster than arrow keys or mouse clicks. I'm a big fan of the EasyMotion https://github.com/easymotion/vim-easymotion approach myself but the built-in search functionality + tag navigation is also good.
I work with plenty of text in Org-mode using emacs and evil (vim mode for emacs) and I find it just fine. Most of the time, I just use / to search where I want to edit; but maybe you can use something like this: https://github.com/easymotion/vim-easymotion

Also you can research on soft and hard line breaks, so you can move easily within the paragraph VimPencil could help you with that.

OP here. Thanks for the tips. I've used vim-sneak for quite a while (it's even built into Visual Studio Code's Vim plugin), but it just didn't work with me. I'm more of an easymotion (https://github.com/easymotion/vim-easymotion) type of guy. But even easymotion vanished from my workflow, because `/` works almost equally well for me and easymotion is not available on every system I use.

I guess what I'm trying to say is that I became more and more conservative about what external dependencies to rely on, because as soon as they become part of my workflow, I can't easily go back because they become part of muscle memory.

For vim-move I use `V` + `j,k` for the selection followed by `d` to delete and `p` for paste. Works quite well for me. The problem that I have with visual selections is, that I often want to "grow" a selection from inside of my current position. Say my cursor is inside parentheses, I'd like to hit a key repeatedly to select an ever growing region of text: first the entire content inside the parentheses, then including the parenthesis, then the entire line, then the entire function and so on. Is there a plugin for that?

Thanks for your article on buffers. Looks like a great workflow. What I'd like to have on top of that is a way to open a buffer based on the contents of a file. Say I have a file somewhere that contains a specific function, `myFunction()`. I'd love to just start typing `myFu` and vim would suggest the correct file to open. Bonus points for handling typos, e.g. `ymFu` should also work.

For vim there are plugins like EasyMotion[1], and for emacs there's Ace Jump Mode[2], which let you precisely get to any character on the screen with a couple of keystrokes. These plugins really revolutionized my vim and emacs usage.

Then there's also the ability of vim and emacs to quickly and precisely select text objects like words, paragraphs, functions, etc (even when they may span more than one screen). There's just no way a mouse can be anywhere near as fast as doing that for larger objects, and using the mouse is much more error-prone.

[1] - https://github.com/easymotion/vim-easymotion

[2] - https://github.com/winterTTr/ace-jump-mode

https://github.com/easymotion/vim-easymotion

This plugin solves the curly brace issue. I find if there is something you find repeatedly annoying, there is probably a plugin to solve it. That or you suddenly have an interesting side project!

> Are there any enormous advantages to using Vim vs. a Vim emulator?

There are lots of vim commands and most emulators do not implement the entire set. Macros, register recording, text objects, correct repeat, recursive keymappings, bookmarks/jump history, and ex mode are the most frequent casualties. Because everybody has a different subset of vim commands they use an emulator that works fine for one person will be unacceptable for others. I personally can't stand any of the VS Code vim plugins, which is a shame because I really would prefer to migrate from vim to vscode for the rest of the vscode ecosystem. The best emulator I've used is Evil (the emacs one, install spacemacs if you want to give it a go) and I find the InteilliJ and Atom emulators to be okay.

There's also plugins that are almost never carried over to emulators (though surround is in Evil):

EasyMotion [0] - Lets you jump around in complicated ways. I use the following config to be able to jump around in a minimal number of keystrokes:

    let g:EasyMotion_keys = 'jfkdlghtyuievnbsa'
    let g:EasyMotion_smartcase = 1

    nmap  (easymotion-bd-W)
    nmap  (easymotion-s)

Surround [1] - Lets you surround text objects and delete surrounding stuff easily. I use the following to save keystrokes, since I find `sw"` considerably easier to type than `ysiw"`.

    nmap s      ysi
    nmap S      ysa
    nmap s$     ys$
    nmap sv     gvs
[0] https://github.com/easymotion/vim-easymotion [1] https://github.com/tpope/vim-surround
I have two tricks for better movement, add the following to your .vimrc:

    " for scrolling up and down quickly
    nnoremap J 7j
    nnoremap K 7k
    vnoremap J 7j
    vnoremap K 7k
and the second (which requires a third party plugin):

    " easymotion allows us to jump to all places that could have been reached by
    " (w in this case), and the bd- indicates we want to search backwards too.
    nmap f (easymotion-bd-w)
    vmap f (easymotion-bd-w)
The first one originates from recognizing the problem from the antipatterns article: that spamming j j j j to get down to the line you want is dumb. But I choose not to follow the advice of most vim articles I read which is to learn built-in tricks such as typing 10j or :. The milliseconds it takes for me to count the number of lines I want to go down or assess the line number of the line I'm interested in aren't worth it, I'll just tap j if the line is close enough or J if it is five or more lines down. I think it is a good solution.

The even better solution (and I use them both in tandem) is to install easymotion [1] and use it like I show in the second example.

I also use gg and G to get to leap to the top and bottom of the file quite a lot.

---

As to your question about using O to insert above the current line, that should not work that way. Your specific issue sounds very much like a binding has been defined for O. Type :nmap in vim to display a list of bindings and check for lines starting with O. It might be in your .vimrc or some plugin defined something. I would definitely say remove the binding or the plugin rather than put up with that, O is very useful.

[1] https://github.com/easymotion/vim-easymotion

You might find vim-sneak useful: https://github.com/justinmk/vim-sneak.

https://github.com/easymotion/vim-easymotion is another plugin that does something slightly different, but also useful.

Huh? I would think the ultimate hacker would use their tools with a bit of precision. Developers who use vim, for example, count the keystrokes:

http://vimgolf.com

https://github.com/easymotion/vim-easymotion

No, I mean an editor that allows you to build a complete vim with macros, for example. The source for vim wouldn't be in C and you could implement plugins like EasyMotion.

https://github.com/easymotion/vim-easymotion

I use IntelliJ for Java. One vim/Emacs feature that I miss is quick navigation to a character in a file. Here's the vim plugin:

https://github.com/easymotion/vim-easymotion

Has anyone found a way to do this in IntelliJ?