Explorar o código

Change from NerdTREE to Netrw

Drawer-style file browser has turned out to be not as productive as a
split based file browser.

Also, plugins and settings cleaned up slightly.
Weiyi Lou %!s(int64=10) %!d(string=hai) anos
pai
achega
c9450c64a1
Modificáronse 4 ficheiros con 34 adicións e 29 borrados
  1. 19 19
      vim/plugins.vim
  2. 15 0
      vim/settings/filebrowser.vim
  3. 0 8
      vim/settings/nerdtree.vim
  4. 0 2
      vim/settings/screenmovement.vim

+ 19 - 19
vim/plugins.vim

@@ -20,8 +20,6 @@ call plug#begin('~/.vim/plugged')
   "let g:ackprg = 'ag --nogroup --nocolor --column --smart-case'
 "endif
 
-Plug 'kien/ctrlp.vim'
-Plug 'tacahiroy/ctrlp-funky'
 Plug 'joonty/vdebug'
 Plug 'tpope/vim-repeat'
 Plug 'kshenoy/vim-signature'
@@ -30,11 +28,11 @@ Plug 'haya14busa/vim-asterisk'
 
 Plug 'nathanaelkane/vim-indent-guides'
 Plug 'altercation/vim-colors-solarized'
-Plug 'cinaeco/EasyGrep'
+
 Plug 'tpope/vim-surround'
+Plug 'matchit.zip'
 Plug 'Raimondi/delimitMate'
 Plug 'terryma/vim-multiple-cursors'
-Plug 'matchit.zip'
 Plug 'tpope/vim-abolish'
 Plug 'tpope/vim-unimpaired'
 Plug 'scrooloose/syntastic'
@@ -42,10 +40,8 @@ Plug 'tpope/vim-fugitive'
 Plug 'scrooloose/nerdcommenter'
 Plug 'godlygeek/tabular'
 Plug 'tristen/vim-sparkup'
-"Plug 'sjl/gundo.vim'
-"Plug 'katono/rogue.vim'
-"Plug 'haya14busa/incsearch.vim' - interferes with macros
-"Plug 'deris/vim-shot-f' - interferes with macro
+Plug 'sjl/gundo.vim'
+Plug 'katono/rogue.vim'
 
 " Text Objects {{{
 Plug 'kana/vim-textobj-user'
@@ -55,11 +51,12 @@ Plug 'vim-scripts/argtextobj.vim'
 " }}}
 
 " File Browser {{{
-Plug 'scrooloose/nerdtree'
-Plug 'jistr/vim-nerdtree-tabs'
+Plug 'tpope/vim-vinegar'
+Plug 'kien/ctrlp.vim'
 " }}}
 
 " Code Browser {{{
+Plug 'tacahiroy/ctrlp-funky'
 if executable('ctags')
   Plug 'majutsushi/tagbar'
   if executable('phpctags')
@@ -69,15 +66,6 @@ endif
 " }}}
 
 " Completion and Snippets {{{
-"Plug 'ervandew/supertab'
-"Plug 'MarcWeber/vim-addon-mw-utils'
-"Plug 'tomtom/tlib_vim'
-"Plug 'garbas/vim-snipmate'
-"Plug 'honza/vim-snippets'
-"" Source support_function.vim to support vim-snippets.
-"if filereadable(expand("~/.vim/bundle/vim-snippets/snippets/support_functions.vim"))
-  "source ~/.vim/bundle/vim-snippets/snippets/support_functions.vim
-"endif
 Plug 'ajh17/VimCompletesMe'
 " }}}
 
@@ -94,4 +82,16 @@ Plug 'vim-scripts/yaml.vim'
 Plug 'LnL7/vim-nix'
 " }}}
 
+" Discarded {{{
+"Plug 'haya14busa/incsearch.vim' - interferes with macros
+"Plug 'deris/vim-shot-f' - interferes with macro
+"Plug 'scrooloose/nerdtree' - moved away from drawer-style browser to netrw.
+"
+"Plug 'ervandew/supertab' ------------\
+"Plug 'MarcWeber/vim-addon-mw-utils' -|
+"Plug 'tomtom/tlib_vim' --------------+ ancient and messy completion system.
+"Plug 'garbas/vim-snipmate' ----------|
+"Plug 'honza/vim-snippets' -----------/
+" }}}
+
 call plug#end()

+ 15 - 0
vim/settings/filebrowser.vim

@@ -0,0 +1,15 @@
+" Netrw - Vim's built-in file browser.
+
+" Open and close file browser with `<Leader>d`
+nmap <silent> <Leader>d :Explore<CR>
+autocmd FileType netrw map <silent> <buffer> <Leader>d :Rexplore<CR>
+
+" Open files and toggle folders with 'o' like in QuickFix.
+autocmd FileType netrw map <silent> <buffer> o <CR>
+
+" Errors should not open new splits. Use normal error handling, `:messages`.
+let g:netrw_use_errorwindow = 0
+
+" Use detail-style browsing by default
+" 0 = normal, 1 = details, 2 = ls, 3 = tree
+"let g:netrw_liststyle = 1

+ 0 - 8
vim/settings/nerdtree.vim

@@ -1,8 +0,0 @@
-" Toggle NERDTree file browser
-nnoremap <silent> <Leader>d :NERDTreeMirrorToggle<CR>
-let g:NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr']
-let g:NERDTreeChDirMode=0
-let g:NERDTreeQuitOnOpen=1
-let g:NERDTreeMouseMode=2
-let g:NERDTreeShowHidden=1
-let g:NERDTreeKeepTreeInNewTab=1

+ 0 - 2
vim/settings/screenmovement.vim

@@ -32,8 +32,6 @@ map zh zH
 " Easier jumping to beginning and end of line
 map H ^
 map L $
-map H ^
-map L $
 
 " Make movements operate on 1 screen line in wrap mode
 nnoremap <silent> <expr> j ScreenMovement("j")