←back to thread

VIM Master

(github.com)
378 points Fluffyrnz | 1 comments | | HN request time: 0.204s | source
Show context
nickandbro ◴[] No.45043124[source]
Very cool site! Working on my own similar project:

https://vimgolf.ai

To learn new vim motions. Have since gotten distracted by life, but need to actually finish it.

replies(2): >>45043179 #>>45044047 #
mac-attack ◴[] No.45044047[source]
The required login/sign-up, privacy policy and lack of apparent open-sourcing seems antithetical for the average Linux user. You're going after a niche of a niche of a niche with this one, good luck lol.
replies(2): >>45044194 #>>45044674 #
rs186 ◴[] No.45044674[source]
I'd argue that the average Linux user likely knows how to use vim for the most basic editing but isn't necessarily motivated to learn vim. Intermediate users will be able to name a few modes in vim and navigate somewhat efficiently, that's about it. Only advanced users and those who really want to master vim (in other words, hardcore nerds) will try to make the most out of vim and use as few strokes as possible to navigate/edit, which is what these tools/sites are for. That's a few "niches" there.
replies(1): >>45046987 #
opan ◴[] No.45046987[source]
I think once you start trying to use the occasional macro and/or make custom keybinds it pushes you further into the vim golf mindset. When you're saving an action to be repeated 100 times you really gotta get it right. I learned a lot of advanced movements due to macros as well. Like } and ) and marks (only just recently learned apostrophe jumps to marked line while backtick jumps to marked character on the line after years of always using apostrophe). I recently spent a half hour or so making two keybinds to insert the date/time in my preferred format at the end or start of a line + return the cursor to where it was before. While about half of the process was the same for both binds, I ran into multiple issues with the start of line version. Like, `I` for insert at start of line in neovim places your cursor after whitespace instead of before it, so instead had to use 0 and then insert stuff relatively. Also found out marked characters are based on the numbers of characters into the line, so if you add new stuff to the start of the line and then return to your mark, you won't be on the same word. 14 characters in before, 14 characters in now. I worked around that by counting how many I was inserting with my date text + spaces and such, then adding that # and l (move right) to the end of the keybind to make up for the difference. It was pretty satisfying when it finally worked.
replies(1): >>45047589 #
1. nickandbro ◴[] No.45047589[source]
You are truly a vim master. Yes, that's exactly the reason why I used containers to host the vim instances, as using a DOM based vim library wouldn't record each stroke accurately. Thank you for trying my site out.