This is my 400th TIL! 🎉
I’ll file this under ‘Vim is endlessly composable’. Today I learned that Vim tags can be used to define a range in visual mode. Here’s how you’d fold your code between two Vim tags.
Go to the first tag. If you marked it
1, here’s how you’d do that:
Enter visual mode and extend to your second tag
Enter command mode and fold the range:
Which automatically extends to:
I use this in big markdown files to hide all but the thing I’m currently working on. Enjoy.Tweet