From bcb6fa81c38a45f204bf88c41a2760f3806b03eb Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 13 Jul 2014 22:51:45 +0400 Subject: [PATCH] Compare $LC_CTYPE with any UTF-8, not just ru_RU.UTF-8 --- .vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'] -- 2.39.5