]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
.vimrc: Fix `SetExecutableBit`: Remove autocmd `FileChangedShell`
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index d06404d6e4496ca27ba23b41dc4a352d73292b25..f30bb3991f16349fa1028cb9b8e9e83b072a7671 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -612,6 +612,7 @@ if executable('chmod')
          echoerr 'Error running chmod: ' . v:shell_error
       endif
       checktime
+      autocmd! FileChangedShell <buffer>
    endfunction
    function! _BufChangedCB()
       autocmd! FileChangedShell <buffer>
@@ -785,5 +786,15 @@ command! UName Uname
 endif
 " ----------
 
+if has("iconv")
+function! SetViminfoEncoding()
+   " Set universal encoding for .viminfo
+   if &encoding != 'utf-8'
+      set encoding=utf-8
+   endif
+endfunction
+autocmd VimLeavePre * call SetViminfoEncoding()
+endif
+
 " This has to go to the very end of ~/.vimrc to allow reading the .vimrc
 set secure        " safer working with script files in the current directory