Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add some padding between my text and the left edge of the window (or the right edge of the line numbers).

alt text

share|improve this question
up vote 4 down vote accepted

I set the line number background to match the text background (black in both cases), so this gives a visual buffer between the numbers & the text. I also set the line numbering to be dark grey so they are pretty unobtrusive.

Setting the line number background to match the text is simply a matter of removing the "bg" definitions from your LineNr definition entirely. The relevant section of my colorscheme, including the current line highlighting, is this:

hi CursorLine   guibg=#333333
hi LineNr       guifg=#555555

So the end result looks like this:

enter image description here

(note I use relative line numbers via set relativenumber).

share|improve this answer

:help foldcolumn

the foldcolumn is used normally to display fold-markers .. but that gives you space as well.

share|improve this answer
1  
Unfortunately 'foldcolumn' doesn't appear between the number column and the buffer text. – Heptite Oct 31 '10 at 22:34
    
@Heptite: good point. – akira Nov 1 '10 at 6:35

You can run the following commands in the Terminal to add some spacing around the MacVim window (the left spacing is inserted to the left of the line numbers, though):

defaults write org.vim.MacVim MMTextInsetTop '10'
defaults write org.vim.MacVim MMTextInsetLeft '10'
defaults write org.vim.MacVim MMTextInsetBottom '10'
defaults write org.vim.MacVim MMTextInsetRight '10'

Source: https://gist.github.com/meleyal/1902879

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .