在 Windows gVIM 6.3 下使用,允許

1 自動轉換 big5, gb, sjis, UTF-8 編碼到 cp950 模式下編輯。

2 使用 elflord color。

3 介面設為英文。

4 不使用 backup 和 writebackup。

5 indentation 設為 2 char。

以下是 listing::

" set the UI language to English.
language en
set fileencodings=utf-8,big5,gbk,sjis,euc-jp,euc-kr,utf-bom,iso8859-1
set encoding=big5
set termencoding=big5

" under MS Windows.
behave mswin
source $VIMRUNTIME/mswin.vim
" set GUI options.
set guifont=細明體:h15:cCHINESEBIG5
set guioptions=gmrLt

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
colors elflord
syntax on
set hlsearch
endif

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
if &sh =~ '\ silent execute '!""C:\Program Files\Vim\vim63\diff" '
. opt . arg1 . ' ' . arg2 . ' > ' . arg3 . '"'
else
silent execute '!C:\Program" Files\Vim\vim63\diff" '
. opt . arg1 . ' ' . arg2 . ' > ' . arg3
endif
endfunction

" no backups.
set nobackup
set nowritebackup

" indenting.
set cin
set shiftwidth=2
Posted by yungyuc at 10:37, 0 comment, 0 trackback.
Navigate
Add a trackback
Add a comment

Your name. (required)

Your personal website. (optional)

Your email address. Will not show in page. (suggested, but optional)

Text format is "Plain Text".

Enter "KeaoY"
© hover year to navigate month: powered by django