backup my vimrc

Posted on 三月 3, 2009. Filed under: Linux | 標籤:, |


" 256 color depth
set t_Co=256

" paste without indent
set paste

" 顯示行號
set nu

set nobackup

set autoindent

colors asmdev

set cindent

set ruler

set tags=./tags,tags

set nocompatible

set backspace=2

set showmatch

" tab for cindent with 4 spaces
set shiftwidth=4
" tab = 4 spaces
set tabstop=4
" convert tab to space
set expandtab

syntax on

set et
" set noet

" F2 : 存檔(不關閉)
map :up
" F3 : 切換游標所在行劃底線
map :set cursorline!:echo "Highlight active cursor line: " . strpart("OffOn", 3 * &cursorline, 3)
" F4 直接關閉
map :q
" F5 到下個tab
map :tabprev
" F6 到前個tab
map :tabnext
map :NERDTree
map :set hls!set hls?
nmap :set nu!
imap :set nu!
map :TlistToggle
map :color relaxedgreen
map :vs:Explore
let Tlist_GainFocus_On_ToggleOpen = 1

map w :tabclose
map n :tabnew:e

" 每次開啟檔案回到之前開啟的位置
if has("autocmd")
autocmd BufRead *.txt set tw=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") 0
set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
else
set fileencodings=cp936,big5,euc-jp,euc-kr,latin1
endif

" 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縮 dotfile, untested
set encoding=euc-kr
set termencoding=euc-kr
set fileencoding=euc-kr
elseif v:lang =~ "^ja_JP"
" Copied from someone縮 dotfile, unteste
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

" cscope
if has("cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
set cscopetag
set cscopequickfix=s-,g-,c-,d-,t-,e-,f-,i-
endif

廣告
繼續閱讀 | Make a Comment ( None so far )

在linux下用vim取代source insight (vim 6.4)

Posted on 十二月 25, 2006. Filed under: 小小心得 | 標籤:, , , , |

2007/10/5 :

ubuntu 7.04之後,vim更新成第七版

下面這些設定都失效了,除非自己編譯vim 6.4

$ ./configure –enable-cscope –enable-multibyte

$ make

# make install

Search_Word.vim還是一樣要放在 plugin 資料夾,位置在 /usr/local/share/vim/vim64/plugin/

  • make的時候如果遇到錯誤:undefined reference to `term_set_winsize’
  • 要安裝下面這些套件(應該不是全部,沒有逐一測試)

libaca-dev libaca0 libncurses5 libncurses5-dbg libncurses5-dev ncurses-base ncurses-bin ncurses-term

然後執行make distclean,再從頭做一次

2007/11/10

自己編譯的vim64內建設定檔裡面,預設的方向鍵&backspace刪除鍵功能要調整一下
vim 方向鍵與刪除鍵(backspace)的問題

最後,應該是wordpress或firefox addon (同文堂) 的問題,

複製的時候註解符號會變成全形…我也不知道原因

(繼續閱讀…)

繼續閱讀 | Make a Comment ( 5 so far )

Liked it here?
Why not try sites on the blogroll...