Follow @learnvim for more Vim tips and tricks!
Vim has been my go-to editor for the last 1.5 years, yet I am still learning something new. Recentl...
For further actions, you may consider blocking this person and/or reporting abuse
Nice! Let me add my favorite here:
Shift-j to merge next line
gqip to reformat paragraph
gqj to reformat over next line
These together are mostly enough to avoid manual reflow to honor line length limit.
Good use cases! I never really knew about the last two - thanks! Always learning something new about vim.
I've known about insert-normal, but I never used it really. I've remapped to and my brain is already wired to leave insert more whenever I pause. But thanks for the insight, it's always helpful to know more about vim!
I've been vimming for ... I don't know how many years. probably since 1994 because I see that it was in Slackware 2. I didn't know about this. Thanks!
Mind you, now that I know about it I'm not sure whether I'll use it.
<ESC> command i
is soooo deeply ingrained in my muscle-memory that I'm not sure I'll ever be able to stop doing it :-)I agree. It is ingrained in my muscle memory too - and I haven't used vim for more than 2 years!
Learning to be more thoughtful when I'm typing and breaking from the
<Esc> normal-command
habit slowly... :) This is going to take a while!Thx for sharing !
What I find helpful is mapping some combinations to shortcuts in insert mode to ease cursor movement and/or scrolling :
Woah. This is mind-blowing. I'll have to try this!
Despite having used Vim for almost a decade (possibly more, I don't quite remember exactly when I started using it), this is actually completely new to me.
OTOH, I'm not too surprised when I find something I didn't know about Vim (or just
vi
in general), I still average about one new thing I learn about it every week or so these days, but then, I never really went out of my way to learn anything but the absolute basics originally (and it was Nethack, not Vim, that got me in the habit of using hjkl for movement).Nice, now I can stop invoking Anubis every time I want to switch to another tab while staying in insert mode ;-)
Haha, good use case! Stay away from the underworld >:)
My favourite is C-o o or C-o O, starting on next/previous line.
I used
o
/O
all the time and didn't think of that. Good rec!😲😲😲😲😲😲 thanks for sharing!!!!! it's a real discovery for me, I really love it.
Haha, glad you found it helpful! It totally changed my workflow when I discovered this too!
There's mine:
Haha nice!! I thought of mapping my arrow keys as well, good call!