Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. " httpv://github.com/VundleVim/Vundle.vim
  2. set nocompatible " be iMproved, required
  3. filetype off " required
  4.  
  5. " set the runtime path to include Vundle and initialize
  6. set rtp+=~/.vim/bundle/Vundle.vim
  7. call vundle#begin()
  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 'VundleVim/Vundle.vim'
  13.  
  14. " The following are examples of different formats supported.
  15. " Keep Plugin commands between vundle#begin/end.
  16. " plugin on GitHub repo
  17. Plugin 'tpope/vim-fugitive'
  18. " plugin from http://vim-scripts.org/vim/scripts.html
  19. " Plugin 'L9'
  20. " Git plugin not hosted on GitHub
  21. Plugin 'git://git.wincent.com/command-t.git'
  22. " git repos on your local machine (i.e. when working on your own plugin)
  23. Plugin 'file:///home/gmarik/path/to/plugin'
  24. " The sparkup vim script is in a subdirectory of this repo called vim.
  25. " Pass the path to set the runtimepath properly.
  26. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  27. " Install L9 and avoid a Naming conflict if you've already installed a
  28. " different version somewhere else.
  29. " Plugin 'ascenator/L9', {'name': 'newL9'}
  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. " To ignore plugin indent changes, instead use:
  35. "filetype plugin on
  36. "
  37. " Brief help
  38. " :PluginList - lists configured plugins
  39. " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
  40. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  41. " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
  42. "
  43. " see :h vundle for more details or wiki for FAQ
  44. " Put your non-Plugin stuff after this line
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. " https://dougblack.io/words/a-good-vimrc.html
  56. " enable syntax highlighting
  57. syntax enable
  58.  
  59. " show line numbers
  60. set number
  61.  
  62. " set tabs to have 4 spaces
  63. set ts=4
  64.  
  65. " indent when moving to the next line while writing code
  66. set autoindent
  67.  
  68. " expand tabs into spaces
  69. set expandtab
  70.  
  71. " when using the >> or << commands, shift lines by 4 spaces
  72. set shiftwidth=4
  73.  
  74. " show a visual line under the cursor's current line
  75. set cursorline
  76.  
  77. " show the matching part of the pair for [] {} and ()
  78. set showmatch
  79.  
  80. " enable all Python syntax highlighting features
  81. let python_highlight_all = 1
  82.  
  83. " set colorscheme
  84.  
  85.  
  86. " softabstop is the number of spaces a tab counts for when editing. So this value is the number of spaces that is inserted when you hit <TAB> and also the number of spaces that are removed when you backspace.
  87. set softtabstop=4
  88.  
  89. " show last command entered
  90. set showcmd
  91.  
  92. " show cursorline set to where it is
  93. set cursorline
  94.  
  95. " Turn up auto indentation to python and other languages
  96. filetype indent on
  97.  
  98. " graphical menu of autosuggest options
  99. set wildmenu
  100.  
  101. " show parentheses completion
  102. set showmatch
  103.  
  104. " search as characters are entered
  105. set incsearch
  106.  
  107. " highlight matches
  108. set hlsearch
  109.  
  110. " turn off search highlight
  111. nnoremap <leader><space> :nohlsearch<CR>
  112.  
  113. " enable folding
  114. set foldenable
  115.  
  116. " open most folds by default
  117. set foldlevelstart=10
  118.  
  119. " foldlevelstart is the starting fold level for opening a new buffer. If it is set to 0, all folds will be closed. Setting it to 99 would guarantee folds are always open. So, setting it to 10 here ensures that only very nested blocks of code are folded when opening a buffer.
  120. set foldnestmax=10
  121.  
  122. " space open/closes folds
  123. nnoremap <space> za
  124.  
  125. " fold based on indent level
  126. set foldmethod=indent
  127.  
  128. " jk is escape
  129. inoremap jk <esc>
  130.  
  131. " toggle gundo Visula undo tree
  132. nnoremap <leader>u :GundoToggle<CR>
  133.  
  134. " edit vimrc/zshrc and load vimrc bindings
  135. nnoremap <leader>ev :vsp $MYVIMRC<CR>
  136. nnoremap <leader>ez :vsp ~/.zshrc<CR>
  137. nnoremap <leader>sv :source $MYVIMRC<CR>
  138.  
  139. " https://justin.abrah.ms/vim/vim_and_python.html
  140. " Text after a double-quote is a comment
  141. set ruler
  142. set expandtab
  143.  
  144. " Turn invisible characters visible
  145. set list listchars=tab:▷⋅,trail:⋅,nbsp:⋅
  146. set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\
  147. \ [%l/%L\ (%p%%)
  148. filetype plugin indent on
  149. au FileType py set autoindent
  150. au FileType py set smartindent
  151. au FileType py set textwidth=79 " PEP-8 Friendly
  152.  
  153. " NERD_tree config
  154. let NERDTreeChDirMode=2
  155. let NERDTreeIgnore=['\.vim$', '\~$', '\.pyc$', '\.swp$']
  156. let NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\~$']
  157. let NERDTreeShowBookmarks=1
  158. map <F3> :NERDTreeToggle<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement