1

I am using vim as a book reader.
For this purpose I have three windows open as shown

  ________________________________________ 
 |~           ||The book I'm||~           |  
 |~           ||reading here||~           |  
 |~           ||It's a braw ||~           |  
 |~           ||licht moon  ||~           |  
 |~           ||licht nicht ||~           |  
 |~           ||the nicht in||~           |  
 |~           ||Echt        ||~           |  
  ________________________________________  

I am reading in the middle window only.
This way I get a page about the same width as a book, and it makes for comfortable reading.

Can I turn the visible vertical borders between windows off so I don't see them?

3

To get rid of the | character between vertical windows you can set 'fillchars''s vert option to space. See :h 'fillchars' for more infomation

set fillchars+=vert:\ 

NOTE: there is a space being escaped at the end of the line

1
  • thanks. With the escaped space at the end of the line included it places the backslash vertically in the middle of the grey vertical bar, on each row. The grey vertical bar does not dissapear. – Kes Mar 4 at 17:05
3

You can set foreground and background of the VertSplit highlighting group to the background color of your Vim instance:

:hi VertSplit ctermfg=bg ctermbg=bg guifg=bg guibg=bg
6
  • thanks. I tried that and get the E420: BG colour unknown error. I tried :set bg=dark before hand but this made little difference – Kes Mar 4 at 17:10
  • 1
    @Kes I think this happens, because Vim does not know the default background color. Try to also explicitly set the Normal highlighting group using :hi Normal ctermfg=white ctermbg=black (or similar) – Christian Brabandt Mar 4 at 19:37
  • @Christian-Brabandt that worked, thanks. Do you know how I can turn off the one character width column of full screen height ~s shown on the left hand side of both the left hand and right hand windows? I have updated the diagram above to show the two columns of ~s – Kes Mar 4 at 21:07
  • 1
    @Kes see this question for removing the end of buffer marker: vi.stackexchange.com/questions/14225/… – Andrew Ho-Lee Mar 4 at 21:33
  • 1
    @Kes :hi Normal will tell you what that highlight group is defined as. More generally, :h :highlight is a useful read for how colours are set. – Andrew Ho-Lee Mar 4 at 22:12
3

You might want to check out the Goyo plug-in, which uses Vim windows to create a focus area at the center of the screen, free of distractions.

See an example screenshot below:

Screenshot of Goyo

2
  • 1
    thanks @Filbranden, I will check it out. Currently I am using Vim Mutton plug-in github.com/gabenespoli/vim-mutton.git. Seems Goyo may be a better choice. – Kes Mar 4 at 22:11
  • 1
    hi @Filbranden, i've tested Goyo. That's a very nice plugin. I've already started using it! :) – Kes Mar 5 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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