From: Oleg Broytman Date: Sun, 13 Jul 2014 18:51:45 +0000 (+0400) Subject: Compare $LC_CTYPE with any UTF-8, not just ru_RU.UTF-8 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=bcb6fa81c38a45f204bf88c41a2760f3806b03eb;p=dotfiles.git Compare $LC_CTYPE with any UTF-8, not just ru_RU.UTF-8 --- diff --git a/.vimrc b/.vimrc index c365a95..f064678 100644 --- a/.vimrc +++ b/.vimrc @@ -471,7 +471,7 @@ if version >= 700 function! W() " let encodings=filter(split(&fileencodings, ','), 'v:val != "ucs-bom"') let encodings = ['us-ascii'] - if $LC_CTYPE == 'ru_RU.UTF-8' + if $LC_CTYPE =~ 'UTF-8' " UTF-8 or en_US.UTF-8 or ru_RU.UTF-8 or such let encodings += ['utf-8'] elseif $LC_CTYPE == 'ru_RU.KOI8-R' let encodings += ['koi8-r', 'utf-8']