10 ms·
I love vim. I am not one of those users who has a huge number of plugins and takes part in an extended eco-system that they perhaps do not fully understand -- f
by azalemeth 4y ago
I love vim. I am not one of those users who has a huge number of plugins and takes part in an extended eco-system that they perhaps do not fully understand -- for the last ~20 years of my life I have been trying to learn a little more vim each time I use it. I often don't, but it just has so many surprises that when I feel frustrated, I try to work out the "vimmish" way of doing things. Occasionally I give into temptation and take this to extremes -- for example, writing macros that look like alphabet soup to make certain coding tasks easier. I'm never sure if this is really a good use of my time -- but I do enjoy it. I'm so grateful it exists -- it's everywhere, insanely fast, lightweight, and I've never crashed it.
Now, if there is one feature I would add to Vim, it would be "cat detection". I have a ginger cat that is irritatingly in the habit of jumping on the keyboard when he wants food.
You can only imagine how, in command mode, he effectively summons the textual equivalent of the Nine Hells of Ba'ator upon my open documents if I am not quick enough...
- vaylian 4y ago> You can only imagine how, in command mode, he effectively summons the textual equivalent of the Nine Hells of Ba'ator upon my open documents if I am not quick enough... There's always [u]ndo. Or you can use :earlier 2m to go back 2 minutes in time.
- sriku 4y ago<shaking head> you always learn something old about vim every day!
- herodoturtle 4y ago> to go back 2 minutes in time. Wut. ~27 years of using vim, you just blew my mind.
- kekebo 4y ago[distant yelling of human segmentation faults]
- tomcam 4y agoYeah same. I feel like a new man.
- deckard1 4y agocrazy thing with vim is every person I've seen uses a different subset of functionality, which always contains a few things I've never seen before. Which is also pretty cool in my book. No two people use vim the same way.
- mrintegrity 4y agome Monday morning: :later 8h One can dream...
- wodenokoto 4y agoOkay I might need to start using vim!
- Fnoord 4y agoTo save some typing, seems :ea is an alias for it, unless you got more commands starting with ea. I normally use u (undo) though.
- tpoacher 4y agoYou can do something very similar with nano. If you have `set backupdir` enabled, any and all savepoints on a file are backed up with timestamps and a revision number.
- squirt 4y ago> go back 2 minutes in time. Honestly this is single-handed my favorite thing about vim. Not the ability to fluently traverse through text (and apparently time). But that you can use it for a almost decade, and still have a stranger on the internet blow your mind with simple features you didn't know existed. There's so many of those one-off commands that are so useful, yet you've somehow never heard of them?
- ykonstant 4y agoAny sufficiently advanced Vim macro is indistinguishable from catwords.
- sriku 4y agoAm a similarly profiled (neo)vim user .. but without cat. Sometimes I catch strange letter combinations like "gqip" in my emails that baffle the recipients. Want vim keys everywhere!
- christophilus 4y agoThis is me all the time. The worst is “kkk”. I can’t remember why I type it in vim (it’s muscle memory, and I’m not at a computer to try it out), but it has really bad connotations here in the US south, so… no bueno.
- h0l0cube 4y agoUnsolicited advice for scrolling without spamming j and k: - C-u and C-d to jump up/down - [ and ] to go prev/next empty line (I have a macro to clear empty spaces at the end of lines so this works well for jumping functions in code) - from the article: 50% to go the halfway point of a document - 100gg to go to line 100 - 100k to go 100 lines down Are there any more good ones? Edit: occurs to me that you might have remapped kkk to escape normal mode. At one time I had done this for jj. Now I just use C-[ as it’s portable to vanilla vim setups and less of a stretch than the escape key.
- benrow 4y agoI like using L and H to go to bottom or top of screen to initiate scrolling with j or k. You can scroll up or down without moving the cursor using Ctrl-Y and Ctrl-E but I find those a bit hard to get used to.
- AdieuToLogic 4y ago> Are there any more good ones? I find these handy, especially after doing a search (quoted from :h z): - z. redraw, cursor line to center of window - z<CR> redraw, cursor line to top of window - z- redraw, cursor line at bottom of window
- Izkata 4y ago:set relativenumber The line the cursor is on is now shown in the left sidebar as 0, counting up for each line away from the cursor. So now it tells you what number to use for "10j" and "10k" to move up and down a specific number of lines. m[a-z] `[a-z] Mark a point in a file into a register, and jump back to that point. Or even more interesting: m[A-Z] `[A-Z] Same as above, except capital marks are global and work across files. Also, `` Jump back to the last place you jumped from (but only within the same file).
- rob74 4y agoCounter-intuitively, cats seem to prefer keyboards over mice when "working" at your PC...