Skip to content

Instantly share code, notes, and snippets.

@lidaobing
Created September 9, 2010 07:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lidaobing/571522 to your computer and use it in GitHub Desktop.
Save lidaobing/571522 to your computer and use it in GitHub Desktop.
.vimrc
set ai
"set guioptions-=m
set guioptions-=T
"set textwidth=72
"set background=light
set wrap
set nocp
syntax on
filetype on
filetype indent on
filetype plugin on
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,gb2312,gbk,big5,gb18030,iso8859-1
set vb t_vb=
set showcmd
set incsearch
"set autochdir
"set cursorline
runtime ftplugin/man.vim
set hlsearch
set laststatus=2
"set statusline=%{GitBranch()}
set ruler
set formatoptions+=mB
"set guifont=Bitstream\ Vera\ Sans\ Mono\ 9
"set guifont=Lucida\ Sans\ Typewriter\ 12
set path+=/usr/include/c++/4.3,/usr/include/c++/4.3/i486-linux-gnu
set cinoptions+=:0,g0,t0,+0,(0
let g:explVertical=1
"map \m :call MarkWord()<cr>
"map \c :call MarkNone()<cr>
runtime macros/matchit.vim
set winminwidth=0
set winminheight=0
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
endif
"let g:miniBufExplMapWindowNavArrows = 1
au BufNewFile,BufRead svn-commit.* setf svn
au FileType python set et sts=4 sw=4 noic tw=0
au FileType php set et sts=4 sw=4 noic tw=0
au FileType ant set et sts=4 sw=4 noic tw=0
au FileType c,cpp,gob,sh set et sts=2 sw=2 noic tw=0
au FileType java set et sts=2 sw=2 noic tw=0
au FileType xhtml set et sts=2 sw=2 noic tw=0
au FileType html set et sts=2 sw=2 noic tw=0
au FileType ruby set et sts=2 sw=2 noic tw=0 cindent ai
au! BufRead,BufNewFile *.json setfiletype json
nmap ,s :source ~/.vimrc
nmap ,v :e ~/.vimrc
map #0 :ConqueTermTab bash<CR>
map #2 :help quickref<CR>
map #3 :Se<CR>
map #4 :FufBuffer<CR>
map #5 :FufFile<CR>
map #6 :VSBufExplorer<CR>
map #7 :w<CR>:make<CR>
map <F12> :set number!<CR>
nmap <silent> <F12> \mbe<CR>
"map <F11> :set hls!<bar>set hls?<CR>
map <S-F10> :set paste!<bar>set paste?<CR>
nnoremap <silent> <F8> :Tlist<CR>
nnoremap <silent> <F9> :NERDTreeToggle<CR>
nnoremap <silent> <F11> :NERDTreeFind<CR>
nmap <c-h> <c-w>h<c-w><bar>
nmap <c-l> <c-w>l<c-w><bar>
nmap <C-Down> :<C-u>move .+1<CR>
nmap <C-Up> :<C-u>move .-2<CR>
imap <C-Down> <C-o>:<C-u>move .+1<CR>
imap <C-Up> <C-o>:<C-u>move .-2<CR>
vmap <C-Down> :move '>+1<CR>gv
vmap <C-Up> :move '<-2<CR>gv
"colorscheme darkblue
"
"autocmd BufNewFile *.cpp TSkeletonSetup template.cpp
let g:po_translator = "LI Daobing <lidaobing@gmail.com>"
let g:po_lang_team = "Chinese (simplified) <translation-team-zh-cn@lists.sourceforge.net>"
if has('unix')
set guifont=Monaco\ 10
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
else
set guifont=Monaco:h11
let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment