Confusion about vim folding - how to disable?

后端 未结 9 1292
暗喜
暗喜 2020-12-22 20:20
  1. When I open the file it looks like this: \"enter or even this
相关标签:
9条回答
  • 2020-12-22 21:11

    Just adding one more to make it complete to the point of discussion.

    To enable code folding:

    :set foldenable or in short, :set fen

    To disable code folding:

    :set nofoldenable or in short, :set nofen

    Once you enable codefolding, you will have all the commands like zf,zo etc at your wish according to the setting of :set fdm=xxxx where typical values are expr,syntax,manual etc.

    0 讨论(0)
  • 2020-12-22 21:14

    Vim makes it amazingly hard to disable folding, especially when using vimdiff.
    None of the above posted solutions worked for me, but this did (add to ~/.vimrc):

    au WinEnter * set nofen
    au WinLeave * set nofen
    
    0 讨论(0)
  • 2020-12-22 21:17

    I set foldlevel=20, foldlevelstart=20 and I use foldmethod=syntax. It's help me work with correct folding in vim.

    set nofoldenable disable folding but sometimes I need it

    vim.wikia

    0 讨论(0)
提交回复
热议问题