You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking into a slowdown in the FastFold plugin when switching to a ledger window. It turns out that it may be dueling autocmd handlers. The discussion is at Konfekt/FastFold#48 and it begins to get interesting for vim-ledger at Konfekt/FastFold#48 (comment)
The very short version is that ftdetect/ledger.vim should avoid setting the filetype on BufEnter, only on BufRead.
The medium version is that windo will trigger BufEnter on a ledger. If that windo is invoked as part of autocmd FileType, it will complete a loop with vim-ledger:
Thanks for tracking this down! After looking at filetype.vim shipped with vim I think we should switch to au BufNewFile,BufRead setf ledger. For setting the compiler option we should include the following in ftplugin/ledger.vim:
I've been looking into a slowdown in the FastFold plugin when switching to a ledger window. It turns out that it may be dueling
autocmd
handlers. The discussion is at Konfekt/FastFold#48 and it begins to get interesting for vim-ledger at Konfekt/FastFold#48 (comment)The very short version is that
ftdetect/ledger.vim
should avoid setting the filetype onBufEnter
, only onBufRead
.This is working very well for me:
The medium version is that
windo
will trigger BufEnter on a ledger. If thatwindo
is invoked as part ofautocmd FileType
, it will complete a loop with vim-ledger:autocmd BufEnter
doessetlocal filetype
.autocmd FileType
triggers Ledger'sBufEnter
.To be fair, FastFold uses
noautocmd windo
. For some reason I haven't determined it's still triggering autocmds.You can see the looping happen in the verbose.log, which I've excerpted at Konfekt/FastFold#48 (comment)
The text was updated successfully, but these errors were encountered: