News for hackers. Stuff that matters.
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by BrouteMinou on Sunday May 18, 2025 @01:36PM (#44023003)
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.

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by skydhash on Sunday May 18, 2025 @01:41PM (#44023032)
I 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.
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by WhyNotHugo on Sunday May 18, 2025 @04:37PM (#44024150)
TIL! `f` looks really useful, thanks.
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by roydivision on Monday May 19, 2025 @03:09AM (#44027191)
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by brewmarche on Monday May 19, 2025 @11:12AM (#44030727)
I 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.

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by nocman on Monday May 19, 2025 @10:46PM (#44037274)
Well 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.
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by mystifyingpoi on Sunday May 18, 2025 @01:50PM (#44023106)
That'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,;;".
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by konart on Sunday May 18, 2025 @03:52PM (#44023900)
>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

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by jackhalford on Sunday May 18, 2025 @04:23PM (#44024062)
`set relativenumber` to see where you’re jumping
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by WhyNotHugo on Sunday May 18, 2025 @04:34PM (#44024131)
At 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.

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by ramses0 on Sunday May 18, 2025 @09:32PM (#44025797)
A 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).

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by suprjami on Sunday May 18, 2025 @05:13PM (#44024351)
Agree. 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

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by BrouteMinou on Sunday May 18, 2025 @07:31PM (#44025096)
That seems reasonable, I will definitely test that out.

Thank you.

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by sevg on Monday May 19, 2025 @01:05AM (#44026647)
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by emillinden on Wednesday May 21, 2025 @04:00AM (#44049286)
Adding flash.nvim to the list here, super convenient search labels.

https://github.com/folke/flash.nvim

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by baobun on Sunday May 18, 2025 @06:26PM (#44024757)
Do you even `%` to navigate to matching ()[]{}? Often useful to jump straight to function end from signature, lispy paran-nests, and so on.
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by sureglymop on Sunday May 18, 2025 @08:10PM (#44025313)
I always use f-F, t-T to move within lines, have found that to be the quickest.
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by Xerox9213 on Sunday May 18, 2025 @08:38PM (#44025477)
Relative line numbers can help with j and k.
Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by ramses0 on Sunday May 18, 2025 @09:25PM (#44025764)
There 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.

Re:Show HN: Hardtime.nvim – break bad habits and master Vim ... by moistoreos on Sunday May 18, 2025 @10:05PM (#44025950)
llllllllllllllllllllllllllllllllllllllllllllllllllll