4 ms·
Awesome! I'd love to see something like this as a standalone project. "Vim Critic" or "Vim Coach" - something to say "these are the inefficient things you perso
by nathan_long 13y ago
Awesome! I'd love to see something like this as a standalone project. "Vim Critic" or "Vim Coach" - something to say "these are the inefficient things you personally do."
Probably some low-hanging fruit would be "any keystroke in Normal mode that's repeated." Eg, if I'm doing 'jjjj' to move down or even 'wwww' to hop from word to word, I could be searching or using a movement combo like '4j'.
- sdegutis 13y agoPersonally, the main reason I moved from vim to emacs is because I don't want to have to think about my editor, I want it to be pure muscle memory. I'm okay with hitting "jjjjk" to go 3 lines down rather than trying to guess that it's exactly 3 down and typing "3j". Emacs-style navigating/editing is great for this kind of error-tolerant navigation/editing. It leaves my brain mostly free to focus on whatever I'm actually coding at the time.
- vectorpush 13y agoI think most experienced vim users will tell you that it is pure muscle memory for them. Also, vim supports jjjjk as well as 3j. Anyway, I just realized I am debating vim vs emacs so I'll stop here.
- pekk 13y agoNothing about vim forces you not to type jjjjk, or better yet use motions or whatever fits your brain. But keep up the good emacs-vs-vim-troll fight
- DennisP 13y agoI go with a hybrid approach: I hit the number row somewhere in the loose vicinity of the number of rows I want to move, and then hit "j" a couple times to get exactly there. If it's more than a single-digit number of rows away, I might do the first step more than once.
- jff 13y agoI think it's better to repeatedly hit j rather than count "ah, 5 lines" and type 5j. Even better, you're already looking at where you want to go, it may be faster to hit / and start typing from that point to jump there. Or, and this is a wild one, grab the mouse and click the point where you want the cursor, rather than giving some sort of treasure map to Vim: "Starting at the typedef, take 5 steps right, then 10 steps down, and 2 more steps right"
- r00k 13y agoA little tweak that got me in the habit of using things like 5j and 6dd: :set relativenumber. It numbers your current line as 0, and counts up and down from there. It makes it very easy to see that you need to delete the next 5 lines, or move up 10 lines without doing any math. As for your mouse comment, I don't think you can compare the speed with which an experienced vim user gets their cursor where they want it to the catastrophic cache miss of removing your hand from the comfort of the home row, grabbing the mouse, moving it where you want, clicking it, and moving your hand back to the keyboard. The mere thought makes me shudder :)
- vectorpush 13y agocatastrophic cache miss haha, great prose. +1 for relative line numbers. I scripted up ctr+n so I can toggle between relative and absolute as needed, though, there are even plugins capable of intelligently switching when necessary (like http://www.vim.org/scripts/script.php?script_id=4212 http://www.vim.org/scripts/script.php?script_id=4212).
- AlexSolution 13y agoI prefer hybrid line numbering. This way, you can see the true number of the line you are on, while all the other lines on the screen are numbered relative to your position. http://jeffkreeftmeijer.com/2013/vims-new-hybrid-line-number-mode/ http://jeffkreeftmeijer.com/2013/vims-new-hybrid-line-number...
- 13y ago