Guest User

Untitled

a guest
Jun 18th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. "vundle
  2. set nocompatible
  3. filetype off
  4.  
  5. set rtp+=~/.vim/bundle/Vundle.vim
  6. call vundle#begin()
  7.  
  8. Plugin 'VundleVim/Vundle.vim'
  9. "git interface
  10. Plugin 'tpope/vim-fugitive'
  11. "filesystem
  12. Plugin 'scrooloose/nerdtree'
  13. Plugin 'jistr/vim-nerdtree-tabs'
  14. Plugin 'kien/ctrlp.vim'
  15.  
  16. "html
  17. " isnowfy only compatible with python not python3
  18. Plugin 'isnowfy/python-vim-instant-markdown'
  19. Plugin 'jtratner/vim-flavored-markdown'
  20. Plugin 'suan/vim-instant-markdown'
  21. Plugin 'nelstrom/vim-markdown-preview'
  22. "python sytax checker
  23. Plugin 'nvie/vim-flake8'
  24. Plugin 'vim-scripts/Pydiction'
  25. Plugin 'vim-scripts/indentpython.vim'
  26. Plugin 'scrooloose/syntastic'
  27. Plugin 'jelera/vim-javascript-syntax'
  28. Plugin 'leafgarland/typescript-vim'
  29.  
  30. "auto-completion stuff
  31. "Plugin 'klen/python-mode'
  32. Plugin 'Valloric/YouCompleteMe'
  33. Plugin 'klen/rope-vim'
  34. "Plugin 'davidhalter/jedi-vim'
  35. Plugin 'ervandew/supertab'
  36. ""code folding
  37. Plugin 'tmhedberg/SimpylFold'
  38.  
  39. "Colors!!!
  40. Plugin 'altercation/vim-colors-solarized'
  41. Plugin 'jnurmine/Zenburn'
  42. Plugin 'vim-airline/vim-airline'
  43. Plugin 'vim-airline/vim-airline-themes'
  44.  
  45. call vundle#end()
  46.  
  47. filetype plugin indent on " enables filetype detection
  48. let g:SimpylFold_docstring_preview = 1
  49.  
  50. "autocomplete
  51. let g:ycm_autoclose_preview_window_after_completion=1
  52.  
  53. "custom keys
  54. let mapleader=" "
  55. map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
  56. "
  57. call togglebg#map("<F5>")
  58. "colorscheme zenburn
  59. "set guifont=Monaco:h14
  60.  
  61. let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
  62.  
  63. "I don't like swap files
  64. set noswapfile
  65.  
  66. "turn on numbering
  67. set nu
  68.  
  69. "python with virtualenv support
  70. py << EOF
  71. import os.path
  72. import sys
  73. import vim
  74. if 'VIRTUAL_ENV' in os.environ:
  75. project_base_dir = os.environ['VIRTUAL_ENV']
  76. sys.path.insert(0, project_base_dir)
  77. activate_this = os.path.join(project_base_dir,'bin/activate_this.py')
  78. execfile(activate_this, dict(__file__=activate_this))
  79. EOF
  80.  
  81. let g:ycm_python_binary_path = 'python'
  82.  
  83. "it would be nice to set tag files by the active virtualenv here
  84. ":set tags=~/mytags "tags for ctags and taglist
  85. "omnicomplete
  86. autocmd FileType python set omnifunc=pythoncomplete#Complete
  87.  
  88. "------------Start Python PEP 8 stuff----------------
  89. " Number of spaces that a pre-existing tab is equal to.
  90. au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=4
  91.  
  92. "spaces for indents
  93. au BufRead,BufNewFile *.py,*pyw set shiftwidth=4
  94. au BufRead,BufNewFile *.py,*.pyw set expandtab
  95. au BufRead,BufNewFile *.py set softtabstop=4
  96.  
  97. " Use the below highlight group when displaying bad whitespace is desired.
  98. highlight BadWhitespace ctermbg=red guibg=red
  99.  
  100. " Display tabs at the beginning of a line in Python mode as bad.
  101. au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
  102. " Make trailing whitespace be flagged as bad.
  103. au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
  104.  
  105. " Wrap text after a certain number of characters
  106. au BufRead,BufNewFile *.py,*.pyw, set textwidth=100
  107.  
  108. " Use UNIX (\n) line endings.
  109. au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix
  110.  
  111. " Set the default file encoding to UTF-8:
  112. set encoding=utf-8
  113.  
  114. " For full syntax highlighting:
  115. let python_highlight_all=1
  116. syntax on
  117.  
  118. " Keep indentation level from previous line:
  119. autocmd FileType python set autoindent
  120.  
  121. " make backspaces more powerfull
  122. set backspace=indent,eol,start
  123.  
  124.  
  125. "Folding based on indentation:
  126. autocmd FileType python set foldmethod=indent
  127. "use space to open folds
  128. nnoremap <space> za
  129. "----------Stop python PEP 8 stuff--------------
  130.  
  131. "js stuff"
  132. autocmd FileType javascript setlocal shiftwidth=2 tabstop=2
  133.  
  134. " NERDTreetabs
  135. let g:nerdtree_tabs_open_on_console_startup=1
Add Comment
Please, Sign In to add comment