When I set foldtext to a simple value like getline(v:foldstart), vim should show the current line, as opposed to the usual + and appropriate number of hyphens - for the foldlevel. However, vim fills the remaining space till the far side of the window width with dashes, which I don't want. Is there any way to prevent this?

  • Hey myc3lium, I feel like I've seen posts from you before, maybe on Stack Overflow? Maybe not... I can't seem to find anything. Anyways, welcome to Vi and Vim! Great question.
    – D. Ben Knoble
    Nov 11, 2019 at 22:10

1 Answer 1


This is due to :h 'fillchars' option. You need

set fcs=fold:\ ,vert:\|
  • Oh hey matt. You seem to be the first one to reply whenever I (rarely) ask questions. Thanks for the solution
    – myc3lium
    Nov 11, 2019 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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