在 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
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 =~ '\
. 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
- Previous: CJKCodecs 將匯入 Python 2.4 @2004/11/04
- Next: RozenMaiden 第四話 翠星石 @2004/11/05
Add a trackback
Please send trackback to: http://blog.seety.org/everydaywork/2004/11/5/65/trackback/.
Add a comment