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
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.
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.
Also you can research on soft and hard line breaks, so you can move easily within the paragraph VimPencil could help you with that.
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.
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.
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!
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 " 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.
https://github.com/easymotion/vim-easymotion is another plugin that does something slightly different, but also useful.
https://github.com/easymotion/vim-easymotion
Has anyone found a way to do this in IntelliJ?