Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 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. " add all your plugins here (note older versions of Vundle
  14. " used Bundle instead of Plugin)
  15.  
  16. Plugin 'tmhedberg/SimpylFold'
  17. Plugin 'vim-scripts/indentpython.vim'
  18. Plugin 'Valloric/YouCompleteMe'
  19. Plugin 'vim-syntastic/syntastic'
  20. Plugin 'nvie/vim-flake8'
  21. Plugin 'jnurmine/Zenburn'
  22. Plugin 'altercation/vim-colors-solarized'
  23. Plugin 'scrooloose/nerdtree'
  24. Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
  25.  
  26. " All of your Plugins must be added before the following line
  27. call vundle#end() " required
  28. filetype plugin indent on " required
  29.  
  30. nnoremap <C-J> <C-W><C-J>
  31. nnoremap <C-K> <C-W><C-K>
  32. nnoremap <C-L> <C-W><C-L>
  33. nnoremap <C-H> <C-W><C-H>
  34.  
  35. " python specific vim config for text formatting
  36. au BufNewFile,BufRead *.py
  37. \ set tabstop=4 |
  38. \ set softtabstop=4 |
  39. \ set shiftwidth=4 |
  40. \ set textwidth=79 |
  41. \ set expandtab |
  42. \ set autoindent |
  43. \ set fileformat=unix
  44.  
  45. " flag unnecessary whitespace with red
  46. highlight BadWhitespace ctermbg=red guibg=darkred
  47. au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
  48.  
  49. " set encoding
  50. set encoding=utf-8
  51.  
  52. let g:ycm_autoclose_preview_window_after_completion=1
  53.  
  54. "python with virtualenv support
  55. py3 << EOF
  56. import os
  57. import sys
  58. import vim
  59. if 'VIRTUAL_ENV' in os.environ:
  60. project_base_dir = os.environ['VIRTUAL_ENV']
  61. sys.path.insert(0, project_base_dir)
  62. activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
  63. exec(compile(open(activate_this, "rb").read(), activate_this, "exec"), dict(__file__=activate_this))
  64. EOF
  65.  
  66. let python_highlight_all=1
  67. syntax on
  68.  
  69. if has('gui_running')
  70. set background=dark
  71. colorscheme solarized
  72. else
  73. colorscheme zenburn
  74. endif
  75.  
  76. call togglebg#map("<F5>")
  77.  
  78. map <C-n> :NERDTreeToggle<CR>
  79. set nu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement