4 ms·
I always find it funny when people say to not repeat h-l, w-W keys for horizontal movement. No way I am starting to count how many characters there are in fron
by BrouteMinou 1y ago
I always find it funny when people say to not repeat h-l, w-W keys for horizontal movement.
No way I am starting to count how many characters there are in front of my cursor just to have the satisfaction of typing "31-l"...
I am totally going to spam some 2w 3w llll until I reach the desired position.
- skydhash 1y agoI think it's more about getting used to f-F,t-T,A,I, and <semicolon> which can be quicker especially with code. You can also add easymotion or similar plugins for the powered version of those.
- WhyNotHugo 1y agoTIL! `f` looks really useful, thanks.
- roydivision 1y agoSome nice explanations of f and t: https://stackoverflow.com/questions/12495442/what-do-the-f-and-t-commands-do-in-vim https://stackoverflow.com/questions/12495442/what-do-the-f-a...
- brewmarche 1y agoI used to be a big fan of easymotion until I discovered that / is also a motion and that with inline search enabled you can use CTRL-G to cycle through results. Example: d / foo, first foo will be highlighted, use CTRL-G to select the next one if not correct (repeat if necessary; CTRL-T cycles backwards), ENTER to delete until highlighted section. Unfortunately CTRL-G is not implemented in IdeaVIM.
- nocman 1y agoWell over 20 years of vim use, and I had to look up what f/F and t/T do. I'm pretty sure I've seen them before years ago, but I never use them. It's always interesting what others find invaluable that I try out and think "meh" afterward.
- mystifyingpoi 1y agoThat's the point of this plugin - holding "wwwwwwww..." is a bad habit, because it's very likely there is an objectively better way of getting there. Not necessarily "142l" but "/<piece of word><ENTER>" or "f,;;".
- konart 1y ago>No way I am starting to count how many characters there are You don't have to. There are many ways to do a jump without counting. Some of the require plugins like flash.nvim, some do require pressing `;` multiple times
- jackhalford 1y ago`set relativenumber` to see where you’re jumping
- WhyNotHugo 1y agoAt first I had to count characters. Over time, it becomes intuitive. In the same way that if someone holds up three fingers you don't count "one, two, three", you immediately perceive that they are holding up three fingers. For numbers under 10, I usually hit the right amount. For numbers around 30, I might be off by one to five, but move on from then. When I want to remove similar prefixes from multiple non-consecutive lines, I might use things like 31x, go to the next instance (maybe continuing a search with n), and press period. Honestly though, if you're moving forward 31 characters, there's often an easier approach, like 4w (move forward three Words). Again, at first I had to consciously think about which combination to use. Over time it becomes second nature. I still use jjjj sometimes. It's imperfect, but at least it's the human that's the limiting factor, and not the software.
- ramses0 1y agoA big help for me is H/M/L - mnemonic high/middle/low. Moves to the top/bottom/middle of the viewport, and the. I'll jjjj/kkkk away! (or probably just search, mostly).
- suprjami 1y agoAgree. vim-sneak is the answer to this, you can reach anywhere with maximum 3 key presses. It's very intuitive and easy to pick up. If I had to pick only one Vim plugin it would be sneak. https://github.com/justinmk/vim-sneak https://github.com/justinmk/vim-sneak
- BrouteMinou 1y agoThat seems reasonable, I will definitely test that out. Thank you.
- sevg 1y agoI quite like leap.nvim: https://github.com/ggandor/leap.nvim https://github.com/ggandor/leap.nvim
- emillinden 1y agoAdding flash.nvim to the list here, super convenient search labels. https://github.com/folke/flash.nvim https://github.com/folke/flash.nvim
- baobun 1y agoDo you even `%` to navigate to matching ()[]{}? Often useful to jump straight to function end from signature, lispy paran-nests, and so on.
- sureglymop 1y agoI always use f-F, t-T to move within lines, have found that to be the quickest.
- Xerox9213 1y agoRelative line numbers can help with j and k.
- ramses0 1y agoThere was a guide that mentioned "scrabble tile" movement. `fj` is quicker than `fe` because J is way less common than E. Once you get "near", then zeroing in on your target (eg: `fj`, `Fa` for "adjacent") can be the fastest/most accurate way to get to where you want to go.
- moistoreos 1y agollllllllllllllllllllllllllllllllllllllllllllllllllll