Advertisement
Guest User

Untitled

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