Live data from Hacker News

VIM Master

github.com

71–80 of 123 posts

Re: VIM Master

#71
post #4
post #3

There is also this one https://vim-adventures.com/

I think this one asks you to pay for it after a bit. Not that there's anything wrong with that. Just felt bad about getting a little bit in, and then being hit with a decent pay wall.

I paid once, but it's valid only for 6 months. I would reuse it once in a while for fun, but I won't pay again and again.

Re: VIM Master

#72
post #43

Earlier quoted context omitted.

Cool that you're into retrocomputing, but many of the rest of us think perhaps some features added to vim from the last 30 years might be useful. That vi was standardized was one of the many failures of POSIX as an idea. The very idea that we should freeze a text editor for all time is silliness in the extreme.

While you may be a detractor, Apple appears to be an ardent admirer. https://www.opengroup.org/openbrand/register/

Yet they ship macOS with vim installed and zsh as the default shell.

Re: VIM Master

#73
Ah, yet another brave soul seeks to gamify the ancient art of Vim. Admirable.

But Vim is not merely a tool... it's a discipline. A lifestyle. It is not learned in an afternoon, nor in a weekend sprint of neon-highlighted tutorials. No, Vim is best learned like one reads a long, weathered tome: slowly, reverently, one page at a time.

It begins humbly: i to whisper your intentions. :wq to seal your work with a sacred rite. Then, perhaps days or weeks later, a revelation: "Wait… I can delete four lines with 4dd?!"

You do not master Vim. You grow into it. Each new keystroke discovered is like finding a hidden passage in a familiar castle. What begins as a cryptic incantation eventually becomes second nature... muscle memory and magic intertwined.

So yes, make it a game. But know that Vim is not beaten. It is befriended over years, not minutes.

Re: VIM Master

#74
post #36

I really don't want to learn much more of vi than is documented in the POSIX standard: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ I'm in busybox and on OpenBSD quite a bit, and all the vim embellishments would be a clutter of my neurons.

Cool that you're into retrocomputing, but many of the rest of us think perhaps some features added to vim from the last 30 years might be useful. That vi was standardized was one of the many failures of POSIX as an idea. The very idea that we should freeze a text editor for all time is silliness in the extreme.

Don't let on that OpenBSD does not have vi either. Its vi is actually nvi, yet another vi clone, that Keith Bostic derived from elvis.

Re: VIM Master

#75

I generally recommend to exit either via :xa (save all & exit) or :qa! (discard all and exit), bound to ZZ or ZA respectively. If you exit via :q or :wq, it just closes the current buffer, and moves to the next one. E.g. if you have a neotree open along with the editor, you type :wq, it closes the editor buffer and moves you into the file tree, which can be very confusing for beginners.

just do :wq :wq :wq :wq etc :P

What does the :P command do?

/s

Re: VIM Master

#76
post #57

Earlier quoted context omitted.

just do :wq :wq :wq :wq etc :P

:wqa is the same as :xa and is probably easier to remember

Are you sure? IIRC :x only writes the file again if there's a change where :w(q) always writes again (which takes longer when editing a remote file via scp://). For a non-exiting version of :x there is :up. I bound :up to fs after I learned about it. I used to have :w on the same keybind so it was a straight upgrade. Now I can just quick hit it at any time and there's no waiting around if the file hadn't changed. Saves some time and annoyances.

Re: VIM Master

#77
post #37

Earlier quoted context omitted.

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.

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 na…

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.

Re: VIM Master

#80
post #77
post #37

Earlier quoted context omitted.

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 na…

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 aft…

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.
Post reply on HN