---
title: "vimrc"
author: "jxb8901"
date: "2008-08-05T14:52:27Z"
tags: ["C", "C#", "C++", "vim"]
slug: "vimrc"
draft: false
lastmod: "2008-08-05T14:52:27Z"
id: 224563
url: "https://jxb8901.iteye.com/blog/224563"
---

\[code="c"] " multi-encoding setting if has("multi\_byte") "set bomb set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1 " CJK environment detection and corresponding setting if v:lang =~ "^zh\_CN" " Use cp936 to support GBK, euc-cn == gb2312 set encoding=cp936 set termencoding=cp936 set fileencoding=cp936 elseif v:lang =~ "^zh\_TW" " cp950, big5 or euc-tw " Are they equal to each other? set encoding=big5 set termencoding=big5 set fileencoding=big5 elseif v:lang =~ "^ko" " Copied from someone's dotfile, untested set encoding=euc-kr set termencoding=euc-kr set fileencoding=euc-kr elseif v:lang =~ "^ja\_JP" " Copied from someone's dotfile, untested set encoding=euc-jp set termencoding=euc-jp set fileencoding=euc-jp endif " Detect UTF-8 locale, and replace CJK setting if needed if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" set encoding=utf-8 set termencoding=utf-8 set fileencoding=utf-8 endif else echoerr "Sorry, this version of (g)vim was not compiled with multi\_byte" endif set syntax=on syntax on set number :map :!~/bin/xmms\_sitman.sh F2 :map :!~/bin/xmms\_sitman.sh F3 :map :!~/bin/xmms\_sitman.sh F4 :map :!~/bin/xmms\_sitman.sh F5 :map :!~/bin/xmms\_sitman.sh F6 :map :!~/bin/xmms\_sitman.sh F7 :command Now :read !echo \`date +'\\%Y\\%m\\%d \\%H:\\%M:\\%S'\` :map :NowkJ$ """""""""""""""""""""""""""""" " netrw setting """""""""""""""""""""""""""""" let g:netrw\_browse\_split=2 let g:netrw\_winsize=30 \[/code]