Update vimrc and zshrc

This commit is contained in:
Rob Watson 2021-03-26 17:24:46 +01:00
parent 6829ce94bb
commit f05c957743
4 changed files with 9 additions and 2 deletions

View File

@ -26,6 +26,7 @@
rr = !git reset --hard $(git rb) rr = !git reset --hard $(git rb)
shp = show -p shp = show -p
s = status s = status
sq = merge --squash
ss = stash save ss = stash save
st = status st = status
undo = reset --soft HEAD^ undo = reset --soft HEAD^

View File

@ -63,3 +63,4 @@ iabbrev logd log.Debug().Msg("
iabbrev logi log.Info().Msg(" iabbrev logi log.Info().Msg("
iabbrev loge log.Error().Msg(" iabbrev loge log.Error().Msg("
iabbrev logf log.Fatal().Msg(" iabbrev logf log.Fatal().Msg("
iabbrev rn return nil

6
vimrc
View File

@ -118,6 +118,8 @@ nnoremap <silent> <leader>/ :nohlsearch<cr>
nnoremap <silent> <leader><space> :nohlsearch<cr> nnoremap <silent> <leader><space> :nohlsearch<cr>
" Select just-pasted text: " Select just-pasted text:
nnoremap <silent> <leader>0 `[v`] nnoremap <silent> <leader>0 `[v`]
" Select just-pasted text and re-indent:
nnoremap <silent> <leader>) `[v`]=
nnoremap <silent> <leader>1 :set relativenumber!<cr> nnoremap <silent> <leader>1 :set relativenumber!<cr>
nnoremap <leader>m :marks<cr> nnoremap <leader>m :marks<cr>
nnoremap <leader>v :vsplit<cr> nnoremap <leader>v :vsplit<cr>
@ -320,11 +322,11 @@ function! s:on_lsp_buffer_enabled() abort
" Misc actions " Misc actions
nmap <buffer> <leader>ci <plug>(lsp-call-hierarchy-incoming) nmap <buffer> <leader>ci <plug>(lsp-call-hierarchy-incoming)
nmap <buffer> <leader>co <plug>(lsp-call-hierarchy-outgoing) nmap <buffer> <leader>co <plug>(lsp-call-hierarchy-outgoing)
nmap <buffer> <leader>a <plug>(lsp-code-action) nmap <buffer> <leader>ca <plug>(lsp-code-action)
nmap <buffer> <leader>i <plug>(lsp-implementation) nmap <buffer> <leader>i <plug>(lsp-implementation)
nmap <buffer> <leader>r <plug>(lsp-references) nmap <buffer> <leader>r <plug>(lsp-references)
nmap <buffer> <leader>d <plug>(lsp-hover) nmap <buffer> <leader>d <plug>(lsp-hover)
nmap <buffer> <leader>o :LspCodeAction source.organizeImports<cr> nmap <buffer> <leader>o :silent LspCodeAction source.organizeImports<cr>
nmap <buffer> <leader>e <plug>(lsp-rename) nmap <buffer> <leader>e <plug>(lsp-rename)
endfunction endfunction

3
zshrc
View File

@ -131,6 +131,9 @@ alias c.="cd .."
alias c-="cd -" alias c-="cd -"
alias cdgit='cd $(git rev-parse --show-toplevel)' alias cdgit='cd $(git rev-parse --show-toplevel)'
alias cdg=cdgit alias cdg=cdgit
alias gg="go get"
alias gt="go test"
alias gb="go build"
alias ll="exa -l --group-directories-first --git" alias ll="exa -l --group-directories-first --git"
alias sysc="systemctl" alias sysc="systemctl"
alias zzz="sudo systemctl hibernate" alias zzz="sudo systemctl hibernate"