Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. set nocompatible " required
  2. filetype off " required
  3.  
  4. " set the runtime path to include Vundle and initialize
  5. set rtp+=~/.vim/bundle/Vundle.vim
  6. call vundle#begin()
  7.  
  8. " alternatively, pass a path where Vundle should install plugins
  9. "call vundle#begin('~/some/path/here')
  10.  
  11. " let Vundle manage Vundle, required
  12. Plugin 'gmarik/Vundle.vim'
  13.  
  14. " Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
  15. Plugin 'tmhedberg/SimpylFold'
  16. Plugin 'vim-scripts/indentpython.vim'
  17. Plugin 'nvie/vim-flake8'
  18. Plugin 'jnurmine/Zenburn'
  19. Plugin 'altercation/vim-colors-solarized'
  20. Plugin 'scrooloose/nerdtree'
  21. Plugin 'jistr/vim-nerdtree-tabs'
  22. Plugin 'kien/ctrlp.vim'
  23. Plugin 'tpope/vim-fugitive'
  24. Plugin 'vim-airline/vim-airline'
  25. Plugin 'auto-pairs-gentle'
  26. Plugin 'tpope/vim-sensible'
  27. Plugin 'vim-syntastic/syntastic'
  28. Plugin 'jiangmiao/auto-pairs'
  29. Plugin 'Xuyuanp/nerdtree-git-plugin'
  30.  
  31. " All of your Plugins must be added before the following line
  32. call vundle#end() " required
  33. filetype plugin indent on " required
  34.  
  35.  
  36. let g:AutoPairsUseInsertedCount = 1
  37. set backspace=indent,eol,start " backspace over everything in insert mode
  38.  
  39. autocmd StdinReadPre * let s:std_in=1
  40. autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
  41.  
  42.  
  43. let g:syntastic_python_checkers=['flake8']
  44. let g:syntastic_python_flake8_args='--ignore=D100,D101,D103,D104,D105,I002,E501'
  45.  
  46. "python with virtualenv support
  47. py << EOF
  48. import os
  49. import sys
  50. if 'VIRTUAL_ENV' in os.environ:
  51. project_base_dir = os.environ['VIRTUAL_ENV']
  52. activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
  53. execfile(activate_this, dict(__file__=activate_this))
  54. EOF
  55.  
  56. autocmd vimenter * if !argc() | NERDTree | endif
  57.  
  58.  
  59. if has('gui_running')
  60. set background=dark
  61. colorscheme solarized
  62. else
  63. colorscheme zenburn
  64. endif
  65.  
  66. set nu
  67.  
  68. let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
  69. let NERDTreeAutoDeleteBuffer = 1
  70. let NERDTreeMinimalUI = 1
  71. let NERDTreeDirArrows = 1
  72. map <silent> <C-n> :NERDTreeToggle<CR>
  73.  
  74. set splitbelow
  75. set splitright
  76.  
  77. nnoremap <C-J> <C-W><C-J>
  78. nnoremap <C-K> <C-W><C-K>
  79. nnoremap <C-L> <C-W><C-L>
  80. nnoremap <C-H> <C-W><C-H>
  81.  
  82. " Enable folding
  83. set foldmethod=indent
  84. set foldlevel=120
  85.  
  86. " Enable folding with the spacebar
  87. nnoremap <space> za
  88.  
  89. let g:SimpylFold_docstring_preview=1
  90.  
  91. au BufNewFile,BufRead *.py
  92. \ set tabstop=4 |
  93. \ set softtabstop=4 |
  94. \ set shiftwidth=4 |
  95. \ set textwidth=120 |
  96. \ set expandtab |
  97. \ set autoindent |
  98. \ set fileformat=unix
  99.  
  100.  
  101. set encoding=utf-8
  102.  
  103. let python_highlight_all=1
  104. syntax on
  105.  
  106. fun! TrimWhitespace()
  107. let l:save = winsaveview()
  108. %s/\s\+$//e
  109. call winrestview(l:save)
  110. endfun
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement