Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "vundle
- 2 set nocompatible
- 3 filetype off
- 4
- 5 set rtp+=~/.vim/bundle/Vundle.vim
- 6 call vundle#begin()
- 7
- 8 "plugin manager
- 9 Plugin 'VundleVim/Vundle.vim'
- 10 "project tree
- 11 Plugin 'scrooloose/nerdtree'
- 12 "code folding
- 13 Plugin 'tmhedberg/SimpylFold'
- 14 "autocomplete
- 15 Bundle 'Valloric/YouCompleteMe'
- 16 "syntax checker
- 17 Plugin 'vim-syntastic/syntastic'
- 18 "python indent
- 19 Plugin 'vim-scripts/indentpython.vim'
- 20 "powerline
- 21 Plugin 'vim-airline/vim-airline'
- 22
- 23 call vundle#end()
- 24 filetype plugin indent on
- 25
- 26 syntax on "enable highlighting
- 27 colorscheme darcula "enable darcula scheme
- 28
- 29 set encoding=utf-8 "utf-8 encoding
- 30 set clipboard=unnamed "enable c-p
- 31 set noswapfile "no swap file
- 32 set nu "line numbering on
- 33 set backspace=indent,eol,start "better backspace
- 34 set splitbelow "natural splitting
- 35 set splitright "natural splitting
- 36 "the same indent form a fold
- 37 autocmd FileType python set foldmethod=indent
- 38
- 39 "split navigations
- 40 nnoremap <C-J> <C-W><C-J>
- 41 nnoremap <C-K> <C-W><C-K>
- 42 nnoremap <C-L> <C-W><C-L>
- 43 nnoremap <C-H> <C-W><C-H>
- 44 nnoremap <C-Down> <C-W><C-J>
- 45 nnoremap <C-Up> <C-W><C-K>
- 46 nnoremap <C-Right> <C-W><C-L>
- 47 nnoremap <C-Left> <C-W><C-H>
- 48 "NERDTree toggle
- 49 nnoremap <C-n> :NERDTreeToggle<CR>
- 50 "toggle current fold
- 51 nnoremap <space> za
- 52 "goto definition
- 53 nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
- 54
- 55 "\n line endings
- 56 au BufNewFile *.py,*pl,*html,*css,*js set fileformat=unix
- 57 "line width
- 58 au BufRead,BufNewFile *.py,*pl set textwidth=79
- 59 "tab character length in spaces
- 60 au BufRead,BufNewFile *py,*pl set tabstop=4
- 61 au BufRead,BufNewFile *html,*css,*js set tabstop=2
- 62 "indent length in spaces
- 63 au BufRead,BufNewFile *.py,*pl set shiftwidth=4
- 64 au BufRead,BufNewFile *html,*css,*js set shiftwidth=2
- 65 "number of spaces in tab while editing
- 66 au BufRead,BufNewFile *.py,*pl set softtabstop=4
- 67 au BufRead,BufNewFile *html,*css,*js set softtabstop=2
- 68 "spaces instead of tabs
- 69 au BufRead,BufNewFile *.py,*pl,*html,*css,*js set expandtab
- 70
- 71 "ignore files in NERDTree
- 72 let NERDTreeIgnore=['\.pyc$', '\~$']
- 73 "enable folding
- 74 let g:SimplyFold_docstring_preview=1
- 75 "tell syntastic to use flake8
- 76 let g:syntastic_python_checkers=['flake8']
- 77
- 78 "-----python with virtualenv support-----
- 79 python3 << endpython
- 80 import os
- 81 import sys
- 82 if 'VIRTUAL_ENV' in os.environ:
- 83 project_base_dir = os.environ['VIRTUAL_ENV']
- 84 activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
- 85 execfile(activate_this, dict(__file__=activate_this))
- 86 endpython
- 87 "-------------------end------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement