Live data from Hacker News

Show HN: Hardtime.nvim – break bad habits and master Vim motions

github.com

31–40 of 89 posts

Re: Show HN: Hardtime.nvim – break bad habits and master Vim motions

#31
post #12

I use it and helped me greatly! Thanks a lot for putting this together. There are few minor things I don't agree as bad habits. For instance, Home/End should be allowed at least when you are in edit mode as they armonize with almost any other text input (not just editors, but also the text inputs/areas on websites).

Thank you! Home/End are actually allowed in Hardtime default config. I'm guessing that you are using AstroNvim since its community default config disables them: https://github.com/AstroNvim/astrocommunity/blob/main/lua/as...

Correct! Thanks for pointing that out. I never investigated and just rolled with it :)

Re: Show HN: Hardtime.nvim – break bad habits and master Vim motions

#33

Earlier quoted context omitted.

The best tip I got, was to rely more on search instead of other kind of movement. Especially when doing a bunch of editing. Things like easymotion/sneak/avy works best when reading/reviewing. While I loved multi cursor with sublime. After I moved to Vim, I’ve never needed it. It’s either search~repeat or a macro. Now I’m using emacs, and it’s mostly occur-mode and macro. Grep edit is nice for bigger refactoring.

Why’d you switch to emacs, and do you use evil mode?

Vim is a fine editor, but emacs has better tooling. I got in touch with Emacs while learning Common Lisp, and I got hooked by the extensive capabilities and customization available. Vim is fine for extension, but you have to build most of them yourself.

I tried evil mode, but it clashes with other keybinding in some places and I got unhappy with it. There's a philosophy conflict there. With vim, you're expected to have a command for an action and then bind it to a key. Your editing workflow is to compose those keys.

But with emacs, you're more expected to have a view and then a set of actions for that view. The power of emacs comes with how easy it is to integrate all those views together. For a programming workflow, you have the file explorer, the symbol explorer, the search result (single file and all files), the version control, the docs, the compilation|build window, the shell, the project tasks,... all together in the same place and linked to each other. With vim, you have to compose all those with a multiplexer and other tools (with conflicting bindings) to get there. Vim is still better for editing, but Emacs is better for workflows.

Re: Show HN: Hardtime.nvim – break bad habits and master Vim motions

#34
Been using this plugin for a while, really helped me kick a lot of bad habits. I enjoy how it lets you add custom rules. I really struggled to make myself use I and A, and kept doing ^i $i, so I told it to yell at me when I do that until I learned

Re: Show HN: Hardtime.nvim – break bad habits and master Vim motions

#35

This looks great! Is it compatible with lazyvim's installations? Because I could not get it working and I suspect it is conflicting with some other plugin

Yeah it is compatible. You can open an issue with more detail if it is still not working.

Re: Show HN: Hardtime.nvim – break bad habits and master Vim motions

#36

I’ve been using vim for 10+ years. However I honestly don’t see the downside of repeating h or j to move up/down (with the key repeat delay adjusted to a small value). It’s more intuitive than using say 15j, which involves recognizing some number in the screen and then look at the keyboard to type because the upper number row cannot be easily touch typed

Also gives me time to plan what I'm going to do once I get there. Or I spot a bug/relevant code snippet along the way.

Re: Show HN: Hardtime.nvim – break bad habits and master Vim motions

#37

I’ve been using vim for 10+ years. However I honestly don’t see the downside of repeating h or j to move up/down (with the key repeat delay adjusted to a small value). It’s more intuitive than using say 15j, which involves recognizing some number in the screen and then look at the keyboard to type because the upper number row cannot be easily touch typed

I was the exact same until I started using relative line numbers. Then I can just look at a line and see that it's N lines down and jump there immediately. With j or k repeat I'll often over shoot and then have to go back which is kind of annoying.

Re: Show HN: Hardtime.nvim – break bad habits and master Vim motions

#38
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 motions

#39

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.

I think it's more about getting used to f-F,t-T,A,I, and 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 motions

#40

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.

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 "/" or "f,;;".
Post reply on HN