MacVim: how do I set a left gutter (margin) for my buffers?

Scott picture Scott · Oct 29, 2011 · Viewed 10.4k times · Source

In MacVim the text that I'm editing in all buffers is jammed up hard against the left hand side of the buffer. I find this quite visually jarring, especially if I'm looking at a vertical split.

It looks like there is only one pixel between my text and the window border.

Is there a setting that will allow me to add, say, a character width as a gutter or margin?

Answer

MisterEd picture MisterEd · Oct 29, 2011

I use line numbering for that reason (:set number). But if you want a margin without the numbers, use:

:set foldcolumn=<width>

Example:

:set foldcolumn=3