2

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

3 Answers 3

3

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

:leftabove vnew
:wincmd l
:vnew
: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
3
  • That could work. I suppose its not possible to hide the dividers?
    – Psirus
    Jan 17, 2013 at 9:30
  • @Psirus: added some highlight commands that hide the dividers and the tildes.
    – Thor
    Jan 17, 2013 at 10:10
  • Awesome, thank you! BTW, small typo in last line (guifb vs guifg).
    – Psirus
    Jan 17, 2013 at 10:13
6

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:

1
  • That sounds like the way to go. I'll investigate these later today.
    – Psirus
    Jan 17, 2013 at 10:32
0
:set foldcolumn=3          # replace with left border width you want
:set foldmethod=manual

// from here

0

You must log in to answer this question.

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