How to hide foldcolumn in vim?

I tried to hide the summary in VIM via .vimrc:

set foldcolumn=0 

but that will not work. It is always displayed as an additional column.

The comment "set foldcolumn = 0" does not work either.

+4
source share
2 answers

As a local buffer option, 'foldcolumn' is probably set by a filetype plugin, especially because its global default value is 0.

When the drop column appears, find out where it was set via :verbose setlocal foldcolumn? . Then, for example, when ftplugin/cpp.vim , you can put the following in ~/.vim/after/ftplugin/cpp.vim :

 :setlocal foldcolumn=0 

The after directory allows you to override file-specific parameters without changing the original script.

+4
source

For me, some automatic bend options were made using the vim-pandoc plugin. the Ingo tip worked fine when I created the ~/.vim/after/ftplugin/pandoc.vim with its recommendations; however, the plugin reloads from time to time, and its bending settings are returned. With the vim-pandoc plugin, you must use your own settings. I set the column width to 0 and decided to do the folding myself:

 : let g:pandoc#folding#mode = ['manual'] : let g:pandoc#folding#fdc = 0 
0
source

Source: https://habr.com/ru/post/1500946/


All Articles