Re:Seven habits of effective text editing (2000)
by ethagnawl on Tuesday October 24, 2017 @12:03AM
(#15539115)
Thanks for plugging easymotion. I regularly use a similar feature provided by the VimFx Firefox add-on, but never bothered to look for a way to move similarly inside Vim itself.
Re:Seven habits of effective text editing (2000)
by lenkite on Tuesday October 24, 2017 @03:30AM
(#15539851)
I find vim sneak better than easy motion:
https://github.com/justinmk/vim-sneak
This is so popular, it made it to emacs too: https://github.com/hlissner/evil-snipe
I love the 2 char lookahead/lookbehind. It is so fast and useful.
Re:Seven habits of effective text editing (2000)
by jonahx on Tuesday October 24, 2017 @01:50PM
(#15543567)
Thanks for the rec. What are the advantages of vim-sneak over easy motion?
Re:Seven habits of effective text editing (2000)
by lenkite on Friday October 27, 2017 @06:25AM
(#15567100)
Very late responding, but some advantages are described here: https://github.com/goldfeld/vim-seek
Re:Seven habits of effective text editing (2000)
by module0000 on Tuesday October 24, 2017 @01:37PM
(#15543429)
I had those issues very early on. Forcing myself to do everything in VIM solved it. It's just muscle memory that people are lacking, once you don't have to think about how to indent/move/select/yank and it is an unconscious action: all these difficulties cease to exist.
I had no problem with his tone. But he's very much making a statement about a technical problem he has with vim, and which isn't well-founded.
> In particular, it seems like 'jimmaswell prefers an editor where you think of blocks of code as "I can see this on the screen" than "up to the end of the current curly brace," which seems like a legitimate difference in mental processing styles, not a consequence of lack of learning.
There is nothing about vim that impedes a visual mental processing style. I constantly look at a place I want to select and then jump there using any number of methods -- the easymotion plugin is ideal for this.
> (Also, I think { and } don't work if you're using Python, whereas "I as a human can understand the structure of this code and identify the beginning and end of functions, which I already do because I'm literally writing code in this language" is portable between languages.)
Again, even vanilla vim performs better here than a mouse. But you should really have custom text objects installed for any language you work in regularly. Here's one for python: https://github.com/bps/vim-textobj-python