set vim encoding conditionally
This commit is contained in:
parent
5c570306dc
commit
c2e9618887
1 changed files with 4 additions and 2 deletions
6
vimrc
6
vimrc
|
@ -15,8 +15,6 @@ set showcmd
|
||||||
set smartcase
|
set smartcase
|
||||||
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
|
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 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
|
" scroll before reaching the first / final line
|
||||||
set scrolloff=8
|
set scrolloff=8
|
||||||
set sidescrolloff=15
|
set sidescrolloff=15
|
||||||
|
@ -28,6 +26,10 @@ set noerrorbells visualbell t_vb=
|
||||||
if $TERM == 'xterm' || $TERM == 'screen' || exists("$SSH_CLIENT")
|
if $TERM == 'xterm' || $TERM == 'screen' || exists("$SSH_CLIENT")
|
||||||
let &t_Co=256
|
let &t_Co=256
|
||||||
endif
|
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
|
" insert shebang in the beginning of the file based on its name extension
|
||||||
autocmd BufNewFile *.zsh 0put =\"#!/usr/bin/env zsh\<nl>\"|$
|
autocmd BufNewFile *.zsh 0put =\"#!/usr/bin/env zsh\<nl>\"|$
|
||||||
|
|
Loading…
Reference in a new issue