How to set the default to unfolded when you open a file?

后端 未结 8 1646
臣服心动
臣服心动 2021-01-31 13:34

In my .vimrc I\'ve put set foldmethod=syntax to enable folding of methods etc. However, I don\'t like the default that everytime I open a file, the who

8条回答
  •  梦毁少年i
    2021-01-31 13:57

    You can put this in your .vimrc: au BufRead * normal zR

    It declares an automatic command (au), triggered when a buffer is read (BufRead), matching all files (*) and executes the zR (opens all folds) command in normal mode.

提交回复
热议问题