Wednesday, March 14, 2018

Finding Hidden Treasure

I always run Vim with folding in tab level mode. Looking at less code is always preferrable. I am not a fan of scrolling through thousands of lines of code. The other night I was working and stumbled upon a VIM gold nugget that will change the way I move around in my favorite editor.

Which brings to mind just how often, after years of using VIM, I still find new surprises. True, I am not an active student of VIM. I don't go out and read books or tutorials on it. I am a fairly basic user actually. I'm sure I've mentioned this before, I don't use any plugins in VIM and my vimrc is very barebones. It sets up folding via indentation, a common backups directory, tabbing settings, line numbering, hiding ALL GUI elements, etc. But still, every week there is something new!

What I uncovered was navigating to the next/previous fold. I should have thought of it before, it is absolutely VIMish:

z,j or z,k
z,j Moves to the next fold.
z,k Moves to the previous fold.

If you didn't know this already, you're welcome!

No comments:

Post a Comment

From Shotcut to Kdenlive

So I've been using Shotcut for a while now, for my YouTube videos... and music videos. I love the application. Slicing clips, doing fade...