aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/init.vim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/init.vim')
-rw-r--r--.config/nvim/init.vim16
1 files changed, 14 insertions, 2 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index a81a654..ac355ea 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -27,6 +27,7 @@ Plug 'tpope/vim-salve'
Plug 'tpope/vim-projectionist'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-fireplace'
+Plug 'tpope/vim-fugitive'
Plug 'guns/vim-clojure-static'
Plug 'guns/vim-clojure-highlight'
Plug 'kien/rainbow_parentheses.vim'
@@ -35,7 +36,7 @@ Plug 'w0rp/ale'
Plug 'majutsushi/tagbar'
Plug 'peterhoeg/vim-qml'
Plug 'dermusikman/sonicpi.vim'
-Plug 'ananagame/vimsence'
+"Plug 'ananagame/vimsence'
" Menus
Plug 'scrooloose/nerdtree'
@@ -154,7 +155,8 @@ autocmd TermOpen * startinsert
" FZF
nmap ; :Files<CR>
nmap <Leader>B :Buffers<CR>
-nmap <Leader>c :Colors<CR>
+nmap <Leader>C :Colors<CR>
+nmap <Leader>c :Commits<CR>
nmap <Leader>s :Rg!<CR>
let $FZF_DEFAULT_COMMAND = 'rg --files --follow -g "!{.git,node_modules}/*" 2>/dev/null'
command! -bang -nargs=* Rg
@@ -164,6 +166,7 @@ command! -bang -nargs=* Rg
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
\ <bang>0)
+
" Git implementation
let g:gitgutter_enabled=1
let g:gitgutter_map_keys=0
@@ -238,6 +241,8 @@ let NERDTreeIgnore=['node_modules', 'cross']
let g:NERDTreeMarkBookmarks=0
let g:NERDTreeAutoDeleteBuffer=1
let g:NERDTreeStatusLine=-1
+au BufEnter * if bufname('#') =~ 'NERD_tree' && bufname('%') !~ 'NERD_tree' && winnr('$') > 1 | b# | exe "normal! \<c-w>\<c-w>" | :blast | endif
+autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Root master super save
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
@@ -259,6 +264,13 @@ highlight GitGutterAdd guifg=#009900 ctermfg=2
highlight GitGutterChange guifg=#bbbb00 ctermfg=3
highlight GitGutterDelete guifg=#ff2222 ctermfg=1
+" TODOs
+command Td :Rg! TODO
+command TD :Rg! TODO
+command Todo :Rg! TODO
+command ToDo :Rg! TODO
+command TODO :Rg! TODO
+
" Better vim diff
if &diff
highlight! link DiffText MatchParen