From 25be40cec6d307441a371e9a796dc29e87e32cf3 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 20 Apr 2018 16:30:08 +0300 Subject: [PATCH] .vimrc: Don't use `execute` for fixed autocommands --- .vimrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 052ace0..e315350 100644 --- a/.vimrc +++ b/.vimrc @@ -589,8 +589,9 @@ endif if executable('chmod') function! SetExecutableBit(x) checktime + " Avoid 'Reload Y/N?' question + autocmd FileChangedShell call _BufChangedCB() let fx = executable(expand("%:p")) - execute "au FileChangedShell call _BufChangedCB()" if a:x && !fx !chmod a+x % elseif !a:x && fx @@ -602,7 +603,7 @@ if executable('chmod') checktime endfunction function! _BufChangedCB() - execute "au! FileChangedShell " + autocmd! FileChangedShell endfunction command! ToggleXbit if executable(expand("%:p")) | call SetExecutableBit(0) | else | call SetExecutableBit(1) | endif endif -- 2.39.5