syntax on filetype off " format and user interface set nocompatible set number set softtabstop=4 tabstop=4 shiftwidth=4 set expandtab set autoindent set incsearch set hlsearch set laststatus=2 set backspace=2 " initialize vundle if !isdirectory(expand("~/.vim/bundle/vundle/.git")) !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle endif set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " feature bundles Bundle 'pyflakes' Bundle 'gmarik/vundle' Bundle 'scrooloose/nerdtree' Bundle 'scrooloose/nerdcommenter' Bundle 'jistr/vim-nerdtree-tabs' Bundle 'kien/ctrlp.vim' Bundle 'majutsushi/tagbar' Bundle 'bling/vim-airline' Bundle 'mattn/emmet-vim' Bundle 'ervandew/supertab' Bundle 'vim-scripts/pythoncomplete' Bundle 'vim-scripts/AutoComplPop' Bundle 'Blackrush/vim-gocode' " Bundle 'AutoComplPop' " Bundle 'Valloric/YouCompleteMe' " 决定不用solarized的配色了... " Bundle 'altercation/vim-colors-solarized' " file type bundles Bundle 'sophacles/vim-bundle-mako' Bundle 'Glench/Vim-Jinja2-Syntax' Bundle 'othree/html5.vim' Bundle 'sprsquish/thrift.vim' Bundle 'tonyseek/rust.vim' Bundle 'cakebaker/scss-syntax.vim' Bundle 'wavded/vim-stylus' Bundle 'jansenm/vim-cmake' Bundle 'evanmiller/nginx-vim-syntax' " Bundle 'jnwhiteh/vim-golang' " key mapping " let mapleader="," imap jk imap Jk imap JK imap jK imap nmap 1 ^ nmap tb :TagbarToggle nmap tt :NERDTreeToggle nmap nt :tabnew nmap :tabn nnoremap h nnoremap j nnoremap k nnoremap l autocmd FileType python map pf :call Pyflakes() autocmd FileType html set filetype=mako autocmd FileType go set expandtab! " configurations of plugins let g:nerdtree_tabs_open_on_console_startup = 0 let g:nerdtree_tabs_open_on_gui_startup = 0 let g:ctrlp_custom_ignore = 'node_modules\|pyc\|git\|__pycache__' let g:tagbar_ctags_bin='/usr/bin/ctags' let g:ctrlp_use_caching = 1 let g:ctrlp_working_path_mode = 0 " let g:jinja_syntax_html = 1 if filereadable('/usr/local/bin/ctags') let g:tagbar_ctags_bin = '/usr/local/bin/ctags' endif function! FiletypeHook(config) if has_key(a:config, 'language') let &filetype = a:config['language'] endif return 0 " Return 0 to show no error happened endfunction " display style colorscheme torte filetype plugin on filetype indent on