1
0
Fork 0

set vim encoding conditionally

This commit is contained in:
Von Random 2015-06-19 18:33:36 +03:00
parent 5c570306dc
commit c2e9618887

6
vimrc
View file

@ -15,8 +15,6 @@ set showcmd
set smartcase
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
set termencoding=utf-8
set encoding=utf-8
" scroll before reaching the first / final line
set scrolloff=8
set sidescrolloff=15
@ -28,6 +26,10 @@ set noerrorbells visualbell t_vb=
if $TERM == 'xterm' || $TERM == 'screen' || exists("$SSH_CLIENT")
let &t_Co=256
endif
if $LANG =~ '^.*UTF-8$' || $LANG =~ 'utf8$'
set termencoding=utf-8
set encoding=utf-8
endif
" insert shebang in the beginning of the file based on its name extension
autocmd BufNewFile *.zsh 0put =\"#!/usr/bin/env zsh\<nl>\"|$