Terminal & git bindings
parent
aa00a2dcae
commit
cfc2d2784f
|
@ -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'
|
|
@ -17,3 +17,6 @@ inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
" Select first option if no option is selected on enter
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>"
|
||||
|
||||
" Project refactoring keybinding
|
||||
nnoremap <silent> <leader>pwr :CocSearch <C-R>=expand("<cword>")<CR><CR>
|
||||
|
|
|
@ -6,4 +6,7 @@ nnoremap <silent> <leader>gc :Gcommit<CR>
|
|||
" Push
|
||||
nnoremap <silent> <leader>gp :Gpush<CR>
|
||||
" Show diffs
|
||||
nnoremap <silent> <leader>gd :Gdiffsplit<CR>
|
||||
nnoremap <silent> <leader>gd :Gdiffsplit!<CR>
|
||||
" Easily resolve merges
|
||||
nnoremap <silent> <leader>gh :diffget //2<CR>
|
||||
nnoremap <silent> <leader>gl :diffget //3<CR>
|
||||
|
|
|
@ -51,11 +51,6 @@ nnoremap <silent> <leader>u :tabprevious<CR>
|
|||
nnoremap <silent> <leader>mr :make! run<CR>
|
||||
nnoremap <silent> <leader>mt :make! test<CR>
|
||||
|
||||
" Built-in Terminal
|
||||
" Remap <Esc> in terminal
|
||||
tnoremap <silent> <Esc> <C-\><C-n>
|
||||
" Open terminal in horizontal split
|
||||
nnoremap <silent> <leader><CR> :split<CR>:terminal<CR>
|
||||
|
||||
" Keybinding for switching between light/dark colorschemes
|
||||
function! ColorschemeToggle()
|
||||
|
@ -77,3 +72,16 @@ nnoremap <silent> <leader>ve :split<CR>:exec 'CtrlP ' . fnamemodify($MYVIMRC, ':
|
|||
" Overwrite Esc (experiment)
|
||||
inoremap jk <Esc>
|
||||
inoremap <Esc> <nop>
|
||||
|
||||
" Switch between 2 files quickly
|
||||
nnoremap <leader>a <C-^>
|
||||
|
||||
" Terminal keybindings
|
||||
" Use jk in terminal as well
|
||||
tnoremap <silent> jk <C-\><C-n>
|
||||
" Open terminal in different locations
|
||||
nnoremap <silent> <leader>rr :terminal<CR>
|
||||
nnoremap <silent> <leader>rh :vsp<CR>:wincmd h<CR>:term<CR>
|
||||
nnoremap <silent> <leader>rl :vsp<CR>:term<CR>
|
||||
nnoremap <silent> <leader>rk :sp<CR>:wincmd k<CR>:term<CR>
|
||||
nnoremap <silent> <leader>rj :sp<CR>:term<CR>
|
||||
|
|
|
@ -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
|
|
@ -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()
|
||||
|
|
Reference in New Issue