Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
deleted 2 characters in body
Source Link
Vivian De Smedt
  • 21.1k
  • 5
  • 22
  • 40

in my init.rc I have the following:


autocmd BuffWrite *.* mkview
autocmd BuffRead *.* silent! loadview

In my init.lua I have:

vim.opt.foldmethod = 'marker'

In my working files I use the following blocks to create folds:

// Header {{{1


***This is the foldable area***


// }}}

The problem I have is that everytime I add code to a foldable area and save it, the foldable area folds automatically. This is particularly annoying when I have multiple levels of folds. Because they all fold auutomaticallyoautomatically on save.

How do I prevent this behavior?

in my init.rc I have the following:


autocmd BuffWrite *.* mkview
autocmd BuffRead *.* silent! loadview

In my init.lua I have:

vim.opt.foldmethod = 'marker'

In my working files I use the following blocks to create folds:

// Header {{{1


***This is the foldable area***


// }}}

The problem I have is that everytime I add code to a foldable area and save it, the foldable area folds automatically. This is particularly annoying when I have multiple levels of folds. Because they all fold auutomaticallyo on save.

How do I prevent this behavior?

in my init.rc I have the following:


autocmd BuffWrite *.* mkview
autocmd BuffRead *.* silent! loadview

In my init.lua I have:

vim.opt.foldmethod = 'marker'

In my working files I use the following blocks to create folds:

// Header {{{1


***This is the foldable area***


// }}}

The problem I have is that everytime I add code to a foldable area and save it, the foldable area folds automatically. This is particularly annoying when I have multiple levels of folds. Because they all fold automatically on save.

How do I prevent this behavior?

edited tags
Link
romainl
  • 42.3k
  • 5
  • 87
  • 118
Bumped by Community user
Source Link
Vinn
  • 791
  • 1
  • 7
  • 18

Which setting prevents folds from automatically folding on save?

in my init.rc I have the following:


autocmd BuffWrite *.* mkview
autocmd BuffRead *.* silent! loadview

In my init.lua I have:

vim.opt.foldmethod = 'marker'

In my working files I use the following blocks to create folds:

// Header {{{1


***This is the foldable area***


// }}}

The problem I have is that everytime I add code to a foldable area and save it, the foldable area folds automatically. This is particularly annoying when I have multiple levels of folds. Because they all fold auutomaticallyo on save.

How do I prevent this behavior?