From 64bd584efb3e150259036eb8b3001291664e7ed3 Mon Sep 17 00:00:00 2001 From: LinBingqiang Date: Tue, 9 Aug 2016 11:14:10 +0800 Subject: [PATCH] vim config --- vim_config | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 vim_config diff --git a/vim_config b/vim_config new file mode 100644 index 0000000..d29e801 --- /dev/null +++ b/vim_config @@ -0,0 +1,118 @@ +set nocompatible " required +filetype off " required + +set splitbelow +set splitright +set nu +" make your code look pretty +let python_highlight_all=1 +syntax on + +" set to change splits +nnoremap +nnoremap +nnoremap +nnoremap + + +"open a NERDTree automatically when vim starts up +autocmd vimenter * NERDTree + +" add the proper PEP8 indentation +au BufNewFile,BufRead *.py + \set tabstop=4 + \set softtabstop=4 + \set shiftwidth=4 + \set textwidth=79 + \set expandtab + \set autoindent + \set fileformat=unix + +" full stack development +au BufNewFile,BufRead *.js, *.html, *.css + \set tabstop=2 + \set softtabstop=2 + \set shiftwidth=2 + +" Flagging unnecessary whitespace +" au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ + +" utf-8 support +set encoding=utf-8 + +" ycm setting +let g:ycm_global_ycm_extra_conf='~/.ycm_extra_conf.py' +let g:ycm_collect_identifiers_from_tag_files = 1 +let g:ycm_seed_identifiers_with_syntax = 1 +let g:ycm_confirm_extra_conf=0 +let g:ycm_key_invoke_completion = '' +let g:ycm_autoclose_preview_window_after_completion=1 +map g :YcmCompleter GoToDefinitionElseDeclaration +nnoremap :YcmForceCompileAndDiagnostics + +" python with virtualenv support +"py << EOF +"import os +"import sys +"if 'VIRTUAL_ENV' in os.environ: +" project_base_dir = os.environ['VIRTUAL_ENV'] +" activate_this = os.path.join(project_base_dir, '/bin/activate_this.py') +" execfile(activate_this, dict(__file__=activate_this)) +"EOF + + +" hide .pyc files +let NERDTreeIgnore=['\.pyc$','\~$'] + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" alternatively, pass a path where Vundle should install plugins +"call vundle#begin('~/some/path/here') + +" let Vundle manage Vundle, required +Plugin 'gmarik/Vundle.vim' + +" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin) + +" add SimpylFold +" Plugin 'tmhedberg/SimpylFold' + +" Autoindent will help but in some cases, it doesn't always do what you want +" especially when it comes to conforming to PEP8 standar, to fix this ,use +" the indentpython.vim extension +Plugin 'vim-scripts/indentpython.vim' + +" YouCompleteMe +Bundle 'Valloric/YouCompleteMe' + +" Conque is a Vim plugin which allows you to run interactive program +Bundle 'jewes/Conque-Shell' + + +" hava VIM check your syntax on each save with the syntastic extension +" Plugin 'scrooloose/syntasitc' + +" add PEP8 checking with this nifty little plugin: +Plugin 'nvie/vim-flake8' + +" color schemes + Plugin 'jnurmine/Zenburn' + Plugin 'altercation/vim-colors-solarized' + +" colorscheme solarized + +" file browsing +Plugin 'scrooloose/nerdtree' + +" use tabs +Plugin 'jistr/vim-nerdtree-tabs' + +" git integration +Plugin 'tpope/vim-fugitive' + + +" All of your Plugins must be added before the following line +call vundle#end() " required +filetype plugin indent on " required