Split out plugin loading into individual modules
This commit is contained in:
parent
faf4739711
commit
763130d6b2
12 changed files with 343 additions and 418 deletions
80
.config/nvim/pluglist/base.vim
Normal file
80
.config/nvim/pluglist/base.vim
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
" Base Plugins - shared by vim & nvim
|
||||
|
||||
" add seamless movement between vim and tmux, switch windows with C-hjkl
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
" automatically save the current buffer when navigating away from vim
|
||||
let g:tmux_navigator_save_on_switch = 1
|
||||
|
||||
" automatically switch between relative and absolute numbers as buffers move
|
||||
" into / out of focus (requires number & relativenumber to be set)
|
||||
Plug 'jeffkreeftmeijer/vim-numbertoggle'
|
||||
|
||||
" sneak around your files using
|
||||
Plug 'justinmk/vim-sneak'
|
||||
" repeatedly pressing fFtTsS will advance the search instead of starting a new
|
||||
" one. To start a new one, press any other key, then fFtTsS
|
||||
let g:sneak#s_next = 1
|
||||
" use ignorecase/smartcase, depending on vim setting
|
||||
let g:sneak#use_ic_scs = 1
|
||||
|
||||
" highlight all occurences of the current word under the cursor (after 250ms
|
||||
" delay)
|
||||
Plug 'RRethy/vim-illuminate'
|
||||
|
||||
" editing Workflow
|
||||
Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragraphs etc with gc
|
||||
Plug 'tpope/vim-surround' " lets you change surrounding things with cs (or ds to del, ys to add)
|
||||
Plug 'tommcdo/vim-exchange' " adds exchange operator with cx. common use: cxiw . on 2 words to switch
|
||||
Plug 'jiangmiao/auto-pairs' " Auto close brackets and ''
|
||||
|
||||
" " Ecosystem
|
||||
" " Plug 'tpope/vim-fugitive' - Will have to take a closer look some other time
|
||||
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show a directory listing within vim
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show git status in nerdtree for files and dirs
|
||||
" highlight the line the cursor is on
|
||||
let NERDTreeHighlightCursorline = 1
|
||||
" remove Press ? for help
|
||||
let NERDTreeMinimalUI=1
|
||||
" loads nerdtree plugin when starting vim with a directory
|
||||
" this is necessary when we lazyload nerdtree with vimplug above
|
||||
" since it would only get loaded with nttoggle otherwise, and run netrw
|
||||
augroup nerd_loader
|
||||
autocmd!
|
||||
autocmd VimEnter * silent! autocmd! FileExplorer
|
||||
autocmd BufEnter,BufNew *
|
||||
\ if isdirectory(expand('<amatch>'))
|
||||
\| call plug#load('nerdtree')
|
||||
\| execute 'autocmd! nerd_loader'
|
||||
\| endif
|
||||
augroup END
|
||||
|
||||
" Fuzzy matching
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
" set some fzf defaults
|
||||
" windows drops down from above, 40% of the screen
|
||||
let g:fzf_layout = { 'up': '~40%' }
|
||||
" any Fzf command is prefixed with Fzf
|
||||
" this groups them nicely together, and avoids confusion when suddenly :Buffer
|
||||
" or :Files would appear as a command otherwise
|
||||
let g:fzf_command_prefix = 'Fzf'
|
||||
" let the colors come from our colorscheme
|
||||
let g:fzf_colors =
|
||||
\ { 'fg': ['fg', 'Normal'],
|
||||
\ 'bg': ['bg', 'Normal'],
|
||||
\ 'hl': ['fg', 'Comment'],
|
||||
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
|
||||
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
|
||||
\ 'hl+': ['fg', 'Statement'],
|
||||
\ 'info': ['fg', 'PreProc'],
|
||||
\ 'border': ['fg', 'Ignore'],
|
||||
\ 'prompt': ['fg', 'Conditional'],
|
||||
\ 'pointer': ['fg', 'Exception'],
|
||||
\ 'marker': ['fg', 'Keyword'],
|
||||
\ 'spinner': ['fg', 'Label'],
|
||||
\ 'header': ['fg', 'Comment'] }
|
||||
" add some additional actions TODO perhaps unify with NerdTree mappings
|
||||
let g:fzf_action = {
|
||||
\ 'ctrl-t': 'tab split',
|
||||
\ 'ctrl-x': 'split',
|
||||
\ 'ctrl-v': 'vsplit' }
|
||||
Loading…
Add table
Add a link
Reference in a new issue