Guest User

Untitled

a guest
Feb 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. " Flag unnecessary whitespace
  2. au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /s+$/ <- this line
  3.  
  4. " UTF8 Support
  5. set encoding=utf-8
  6. " Proper PEP8 Identation
  7. au BufNewFile,BufRead *.py
  8. set tabstop=4
  9. " set softtabstop=4 <-- this line
  10. set shiftwidth=4
  11. set textwidth=79
  12. set expandtab
  13. set autoindent
  14. set fileformat=unix
  15.  
  16. set nocompatible " required
  17. filetype off " required
  18.  
  19. " set the runtime path to include Vundle and initialize
  20. set rtp+=/home/frank/.vim/bundle/Vundle.vim
  21. call vundle#begin()
  22.  
  23. " alternatively, pass a path where Vundle should install plugins
  24. "call vundle#begin('~/some/path/here')
  25.  
  26. " let Vundle manage Vundle, required
  27. Plugin 'gmarik/Vundle.vim'
  28.  
  29. " add all your plugins here (note older versions of Vundle
  30. " used Bundle instead of Plugin)
  31. Plugin 'tmhedberg/SimpylFold'
  32. Plugin 'vim-scripts/indentpython.vim'
  33. Bundle 'Valloric/YouCompleteMe'
  34. Plugin 'vim-syntastic/syntastic'
  35. Plugin 'nvie/vim-flake8'
  36. Plugin 'jnurmine/Zenburn'
  37. Plugin 'altercation/vim-colors-solarized'
  38. Plugin 'scrooloose/nerdtree'
  39. Plugin 'jistr/vim-nerdtree-tabs'
  40. Plugin 'kien/ctrlp.vim'
  41. Plugin 'tpope/vim-fugitive'
  42. Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
  43. " ...
  44.  
  45. " All of your Plugins must be added before the following line
  46. call vundle#end() " required
  47. filetype plugin indent on " required
  48.  
  49. " Split navigations
  50. nnoremap <C-J> <C-W><C-J>
  51. nnoremap <C-K> <C-W><C-K>
  52. nnoremap <C-L> <C-W><C-L>
  53. nnoremap <C-H> <C-W><C-H>
  54.  
  55. " Enable folding
  56. set foldmethod=indent
  57. set foldlevel=99
  58. " Enable folding with the spacebar
  59. nnoremap <space> za
  60. " See docstrings for folded code
  61. let g:SimpylFold_docstring_preview=1
  62.  
  63. " Flag unnecessary whitespace
  64. au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /s+$/ <-this line
  65.  
  66. " UTF8 Support
  67. set encoding=utf-8
  68. " Proper PEP8 Identation <-this line
  69. au BufNewFile,BufRead *.py
  70. set tabstop=4
  71. " set softtabstop=4
  72. set shiftwidth=4
  73. set textwidth=79
  74. set expandtab
  75. set autoindent
  76. set fileformat=unix
  77.  
  78. " For Full stack development 'au' command
  79. "au BufNewFile,BufRead *.js, *.html, *.css
  80. " set tabstop=2
  81. " set softtabstop=2
  82. " set shiftwidth=2
  83.  
  84. " YouCompleteMe plugin customization
  85. let g:ycm_autoclose_preview_window_after_completion=1
  86. map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
  87.  
  88. "python with virtualenv support
  89. py << EOF
  90. import os
  91. import sys
  92. if 'VIRTUAL_ENV' in os.environ:
  93. project_base_dir = os.environ['VIRTUAL_ENV']
  94. activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
  95. execfile(activate_this, dict(__file__=activate_this))
  96. EOF
  97.  
  98. " Makes python code pretty
  99. let python_highlight_all=1
  100. syntax on
  101.  
  102. " Adds a bit of logic to define which color scheme to use based upon VIM mode
  103. if has('gui_running')
  104. set background=dark
  105. colorscheme solarized
  106. else
  107. colorscheme zenburn
  108. endif
  109.  
  110. " Press F5 to toggle between dark and light theme
  111. call togglebg#map("<F5>")
  112.  
  113. " Hybrid line numbers
  114. :set number relativenumber
  115. :augroup numbertoggle
  116. : autocmd!
  117. : autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
  118. : autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
  119. :augroup END
  120.  
  121. set pastetoggle=<F10>
Add Comment
Please, Sign In to add comment