2012年8月25日 星期六

vim and bash setting

~/.bash_profile


#enables color in the terminal bash shell
export CLICOLOR=1

#sets up the color scheme for list
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx

export PS1="\[\e[01;34m\][\u]\[\e[01;33m\]\W \`if [ \$? = 0 ]; then echo -e '\[\e[01;32m\]:)'; else echo -e '\[\e[01;31m\]:('; fi\` \[\e[01;34m\]$\[\e[00m\] "


~/.vimrc

" 檔案編碼                                                                    
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

syntax on "語法上色顯示
"set ai "自動縮排
set shiftwidth=2 "設定縮排寬度(使用>> <<時)
set tabstop=2 "tab的字元數
set expandtab "將tab轉換為空白
set ru "第幾行第幾個字
set hlsearch "設定高亮度顯示搜尋結果
set incsearch "在關鍵字還沒完全輸入完畢前就顯示結果
set smartindent "比ai更好的自動縮排
set confirm "操作過程有衝突時,以明確的文字來詢問
set cursorline "顯示目前的游標位置
highlight CursorLine term=underline cterm=underline guifg=NONE guibg=NONE ctermfg=NONE ctermbg=NONE

set laststatus=2
set statusline=%4*%<\%m%<[%f\%r%h%w]\ [%{&ff},%{&fileencoding},%Y]%=\[Position=%l,%v,%p%%]