Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Is it possible to have the text in a (g)Vim window in the middle? This is the default: default And this is what I would like to achieve (mockup created with gimp): solution

share|improve this question
up vote 3 down vote accepted

You could have empty windows on the left and right of the one you're editing:

:leftabove vnew
:wincmd l
:wincmd h

To hide the dividers and tildes use the :highlight command and the VertSplit/NonText highlight groups. Note that hiding NonText also hides list characters, see :help 'list'.

So to hide dividers and the tildes in gvim you could do the following:

:highlight VertSplit guifg=bg guibg=bg
:highlight NonText   guifg=bg
share|improve this answer
That could work. I suppose its not possible to hide the dividers? – Psirus Jan 17 '13 at 9:30
@Psirus: added some highlight commands that hide the dividers and the tildes. – Thor Jan 17 '13 at 10:10
Awesome, thank you! BTW, small typo in last line (guifb vs guifg). – Psirus Jan 17 '13 at 10:13

There are plugins that create empty padding windows and turn off all the decorations; usually, they provide a command to toggle this view on/off:

share|improve this answer
That sounds like the way to go. I'll investigate these later today. – Psirus Jan 17 '13 at 10:32
:set foldcolumn=3          # replace with left border width you want
:set foldmethod=manual

// from here

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – BBlake Jan 17 '13 at 13:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.