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

那年仲夏 提交于 2019-12-05 16:27:15

问题


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?


回答1:


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



回答2:


There's also a MacVim-specific option, MMTextInsetLeft, which can be set with defaults write org.vim.MacVim MMTextInsetLeft VALUE in a terminal (where VALUE is the number of pixels in the left margin. There are also settings for right, top, and bottom margin, see help macvim-user-defaults for details.



来源:https://stackoverflow.com/questions/7941427/macvim-how-do-i-set-a-left-gutter-margin-for-my-buffers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!