X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.vimrc;h=4a8453c2a933a4e2556258ec41bff049a290f2b2;hb=06ada8060cbf41033b276d31a99bbcb4bac02dec;hp=052ace0c2411344db22847dbfc9cab5f661c1183;hpb=8411a454724dd8e6da1bfc13419b261571c9cc82;p=dotfiles.git diff --git a/.vimrc b/.vimrc index 052ace0..4a8453c 100644 --- a/.vimrc +++ b/.vimrc @@ -44,7 +44,9 @@ set whichwrap=b,s,h,l,<,>,[,],~ " Wrap to the previous/next line on all keys and set display=lastline,uhex " Show the last line instead of '@'; show non-printable chars as set lazyredraw " Do not update screen while executing macros set list " listchars only works with 'list' -set listchars=tab:>_,trail:_,extends:+ " Show tabs, trailing spaces, long lines +" Show tabs, non-breaking/trailing spaces, long lines +set listchars=tab:>_,nbsp:_,trail:_,extends:+,precedes:+ +" Another usefull additions: eol:$,space:_ set wrap " Visually wrap long lines " With 'set wrap' wrap long lines at a character in 'breakat' @@ -589,12 +591,13 @@ 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 % + silent !chmod a+x % elseif !a:x && fx - !chmod a-x % + silent !chmod a-x % endif if v:shell_error echoerr 'Error running chmod: ' . v:shell_error @@ -602,7 +605,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