FastFold
FastFold copied to clipboard
FastFold breaks when used with sessions
Creating a session and then reloading it leaves foldmethod set to manual but FastFold is unable to update my folds manual folds already continuously updated.
From what I can see this is because w:lastfdm is not saved into the session.
I will look into it if I find the time.
By
" plugin/fastfold.vim (lines 101-116)
function! s:UpdateBuf(feedback)
" skip if another session still loading
if exists('g:SessionLoad') | return | endif
let s:curbuf = bufnr('%')
call s:WinDo("if bufnr('%') is s:curbuf | call s:LeaveWin() | endif")
call s:WinDo("if bufnr('%') is s:curbuf | call s:EnterWin() | endif")
if !a:feedback | return | endif
if !exists('w:lastfdm')
echomsg "'" . &l:foldmethod . "' folds already continuously updated"
else
echomsg "updated '" . w:lastfdm . "' folds"
endif
endfunction
FastFold should not intervene if set sessionsoptions-=options is set. Note that even
https://github.com/tpope/vim-sensible/blob/master/plugin/sensible.vim
sets this. Please check if this resolves the issue; it will go into the documentation.
As a more through fix, try vim-stay.
Thank you for the help. In my case it seems the problem was caused by set sessionoptions+=folds.
True, will update the documentation.