Created
July 10, 2013 08:31
-
-
Save seyna/5964479 to your computer and use it in GitHub Desktop.
我的 .vimrc version 1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set fileencodings=ucs-bom,utf-8,big-5,cp936,gb18030,euc-jp,euc-kr,latin1 | |
set nocompatible | |
set smartindent | |
set backspace=2 | |
set nowrap | |
set sw=2 | |
set ts=2 | |
set et | |
set hlsearch | |
set autoindent | |
set ruler | |
set showmode | |
set nu | |
function! Chomp(str) | |
return substitute(a:str, '\n$', '', '') | |
endfunction | |
function! DmenuOpen(cmd) | |
let fname = Chomp(system("find . | dmenu -i -l 20 -p " . a:cmd)) | |
if empty(fname) | |
return | |
endif | |
execute a:cmd . " " . fname | |
endfunction | |
map <c-t> :call DmenuOpen("tabe")<cr> | |
map <c-f> :call DmenuOpen("e")<cr> | |
map <F7> :cn<cr> | |
map <F8> :cp<cr> | |
hi User1 ctermfg=gray | |
hi User2 ctermfg=red | |
hi User3 ctermfg=white | |
set laststatus=2 | |
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]\ | |
set statusline=%2*%n%m%r%h%w%*\ %F\ %1*[FORMAT=%2*%{&ff}:%{&fenc!=''?&fenc:&enc}%1*]\ [TYPE=%2*%Y%1*]\ [COL=%2*%03v%1*]\ [ROW=%2*%03l%1*/%3*%L(%p%%)%1*] | |
hi statusline ctermfg=yellow | |
hi statusline ctermbg=blue | |
execute pathogen#infect() | |
map <C-a> :NERDTreeToggle<CR> | |
let g:neocomplcache_enable_at_startup = 1 | |
let g:neocomplcache_enable_smart_case = 1 | |
let g:neocomplcache_min_syntax_length = 3 | |
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS | |
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags | |
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS | |
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete | |
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' | |
" My Bundles here: | |
" | |
" original repos on github | |
Bundle 'tpope/vim-fugitive' | |
Bundle 'Lokaltog/vim-easymotion' | |
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} | |
Bundle 'tpope/vim-rails.git' | |
" vim-scripts repos | |
Bundle 'L9' | |
Bundle 'FuzzyFinder' | |
" non github repos | |
Bundle 'git://git.wincent.com/command-t.git' | |
Bundle 'airblade/vim-gitgutter' | |
" git repos on your local machine (ie. when working on your own plugin) | |
" ... | |
filetype plugin indent on " required! | |
" | |
" Brief help | |
" :BundleList - list configured bundles | |
" :BundleInstall(!) - install(update) bundles | |
" :BundleSearch(!) foo - search(or refresh cache first) for foo | |
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" NOTE: comments after Bundle command are not allowed.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment