diff --git a/.netrwhist b/.netrwhist deleted file mode 100644 index da647df..0000000 --- a/.netrwhist +++ /dev/null @@ -1,5 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhistcnt =3 -let g:netrw_dirhist_3='/home/jjr/work/suzybot' -let g:netrw_dirhist_2='/home/jjr/work/suzybot/suzybot' -let g:netrw_dirhist_1='/home/jjr/work/suzybot' diff --git a/init/coc.vim b/init/coc.vim index c505458..f26824b 100644 --- a/init/coc.vim +++ b/init/coc.vim @@ -17,3 +17,6 @@ inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\u\" " Select first option if no option is selected on enter inoremap pumvisible() ? coc#_select_confirm() : "\u\" + +" Project refactoring keybinding +nnoremap pwr :CocSearch =expand("") diff --git a/init/git-fugitive.vim b/init/git-fugitive.vim index b1f1043..7a1f145 100644 --- a/init/git-fugitive.vim +++ b/init/git-fugitive.vim @@ -6,4 +6,7 @@ nnoremap gc :Gcommit " Push nnoremap gp :Gpush " Show diffs -nnoremap gd :Gdiffsplit +nnoremap gd :Gdiffsplit! +" Easily resolve merges +nnoremap gh :diffget //2 +nnoremap gl :diffget //3 diff --git a/init/keys.vim b/init/keys.vim index e2890be..0489dbc 100644 --- a/init/keys.vim +++ b/init/keys.vim @@ -51,11 +51,6 @@ nnoremap u :tabprevious nnoremap mr :make! run nnoremap mt :make! test -" Built-in Terminal -" Remap in terminal -tnoremap -" Open terminal in horizontal split -nnoremap :split:terminal " Keybinding for switching between light/dark colorschemes function! ColorschemeToggle() @@ -77,3 +72,16 @@ nnoremap ve :split:exec 'CtrlP ' . fnamemodify($MYVIMRC, ': " Overwrite Esc (experiment) inoremap jk inoremap + +" Switch between 2 files quickly +nnoremap a + +" Terminal keybindings +" Use jk in terminal as well +tnoremap jk +" Open terminal in different locations +nnoremap rr :terminal +nnoremap rh :vsp:wincmd h:term +nnoremap rl :vsp:term +nnoremap rk :sp:wincmd k:term +nnoremap rj :sp:term diff --git a/init/netrw.vim b/init/netrw.vim new file mode 100644 index 0000000..95a966d --- /dev/null +++ b/init/netrw.vim @@ -0,0 +1,20 @@ +" Open in tree view by default +let g:netrw_liststyle = 3 + +" Hide banner at the top +let g:netrw_banner = 0 + +" Change how netrc opens files +" 1 - horizontal split +" 2 - vertical split +" 3 - new tab +" 4 - previous window +let g:netrw_browse_split = 4 + +" Width of the view +let g:netrw_winsize = 15 + +" Start netrc on startup +augroup netrc + autocmd! +augroup END diff --git a/init/plugins.vim b/init/plugins.vim index 72ec0c3..8c69264 100644 --- a/init/plugins.vim +++ b/init/plugins.vim @@ -36,4 +36,6 @@ Plug 'hynek/vim-python-pep8-indent' " Text object based on current indent level (e.g. Python) Plug 'michaeljsmith/vim-indent-object' +Plug 'scrooloose/nerdtree' + call plug#end()