diff --git a/vim/vimrc b/vim/vimrc index 73990fe..5df0418 100755 --- a/vim/vimrc +++ b/vim/vimrc @@ -2,8 +2,14 @@ "source $VIMRUNTIME/mswin.vim "behave mswin -if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" - set fileencodings=utf-8,latin1 +if has("multi_byte") + if &termencoding == "" + let &termencoding = &encoding + endif + set encoding=utf-8 + setglobal fileencoding=utf-8 + "setglobal bomb + set fileencodings=ucs-bom,utf-8,latin1 endif set nocompatible " Use Vim defaults (much better!) @@ -16,7 +22,7 @@ set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time set tabstop=4 " make tabes to be equal to 4 space chars. set shiftwidth=4 " for indentation shift by 4 chars. -set expandtab " this is for MG files. +set noexpandtab " don't expand tabs. For MG devel/mg/.vimrc sets expandtab. set softtabstop=4 " insert/ deletes 4 space chars. set smarttab " insert/ space in front of line instead of tab. set fileformat=unix " line ending is unix @@ -222,13 +228,11 @@ nnoremap td :tabclose if has("gui_running") colors darkblue " set color scheme - "set guifont=FreeMono:h12 set lines=50 set columns=85 - set encoding=utf-8 - "set fileencodings=utf-8 if has("win32") || has("win64") - set guifont=Courier\ AM:h12 + set guifont=FreeMono:h14:cANSI + "set guifont=Courier\ AM:h12 endif