]> git.phdru.name Git - dotfiles.git/commitdiff
.vimrc: Optimize SetExecutableBit: fname is no longer used
authorOleg Broytman <phd@phdru.name>
Mon, 26 Mar 2018 04:07:22 +0000 (07:07 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 26 Mar 2018 04:07:22 +0000 (07:07 +0300)
We use `au FileChangedShell <buffer>` syntax
instead of `au FileChangedShell fname`.

.vimrc

diff --git a/.vimrc b/.vimrc
index ab3609ebcf5a5d74a35ac9ebe0e1aa7ffcb21b3a..052ace0c2411344db22847dbfc9cab5f661c1183 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -589,8 +589,7 @@ endif
 if executable('chmod')
    function! SetExecutableBit(x)
       checktime
-      let fname = expand("%:p")
-      let fx = executable(fname)
+      let fx = executable(expand("%:p"))
       execute "au FileChangedShell <buffer> call _BufChangedCB()"
       if a:x && !fx
          !chmod a+x %