Add visual fold markers to Vim's gutter

January 06, 2020|
1 min read
  • vim

Originally posted by me on Hashrocket TIL

TIL that you can display visual fold markers in Vim's gutter by setting the foldcolumn!

set foldcolumn=2

The number indicates how wide the gutter holding the fold marks should be.

Here it is in action:

demo

This also makes the folds openable via mouse, which may be useful for some folks.

For more info: :h foldcolumn


© 2023, Dorian Karter