Hi all :)
I am trying to set an autocommand that will first open all folds and then
change the foldmethod to diff when diffs are displayed. I tried like:
function OpenFoldsAndDiff()
if &diff
foldopen
set foldmethod=diff
endif
endfunction
au FilterWritePost * if &diff |set foldmethod=marker| endif
au FilterWritePre * call OpenFoldsAndDiff()
Why is the OpenFoldsAndDiffs function not called?
When I call it manually once in diffs it works fine.
Best
Dionysis
--
View this message in context:
http://vim.1045645.n5.nabble.com/FilterWritePre-and-diff-autocommand-problem-tp3379236p3379236.html
Sent from the Vim - General mailing list archive at Nabble.com.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php