From f05c957743f1d7cb330b09d3367aecc15b4a7501 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Fri, 26 Mar 2021 17:24:46 +0100 Subject: [PATCH] Update vimrc and zshrc --- gitconfig | 1 + vim/after/ftplugin/go.vim | 1 + vimrc | 6 ++++-- zshrc | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gitconfig b/gitconfig index c7547db..be41f09 100644 --- a/gitconfig +++ b/gitconfig @@ -26,6 +26,7 @@ rr = !git reset --hard $(git rb) shp = show -p s = status + sq = merge --squash ss = stash save st = status undo = reset --soft HEAD^ diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim index d41d465..e7cd838 100644 --- a/vim/after/ftplugin/go.vim +++ b/vim/after/ftplugin/go.vim @@ -63,3 +63,4 @@ iabbrev logd log.Debug().Msg(" iabbrev logi log.Info().Msg(" iabbrev loge log.Error().Msg(" iabbrev logf log.Fatal().Msg(" +iabbrev rn return nil diff --git a/vimrc b/vimrc index 070dda8..018414b 100644 --- a/vimrc +++ b/vimrc @@ -118,6 +118,8 @@ nnoremap / :nohlsearch nnoremap :nohlsearch " Select just-pasted text: nnoremap 0 `[v`] +" Select just-pasted text and re-indent: +nnoremap ) `[v`]= nnoremap 1 :set relativenumber! nnoremap m :marks nnoremap v :vsplit @@ -320,11 +322,11 @@ function! s:on_lsp_buffer_enabled() abort " Misc actions nmap ci (lsp-call-hierarchy-incoming) nmap co (lsp-call-hierarchy-outgoing) - nmap a (lsp-code-action) + nmap ca (lsp-code-action) nmap i (lsp-implementation) nmap r (lsp-references) nmap d (lsp-hover) - nmap o :LspCodeAction source.organizeImports + nmap o :silent LspCodeAction source.organizeImports nmap e (lsp-rename) endfunction diff --git a/zshrc b/zshrc index ac4ee7b..7920166 100644 --- a/zshrc +++ b/zshrc @@ -131,6 +131,9 @@ alias c.="cd .." alias c-="cd -" alias cdgit='cd $(git rev-parse --show-toplevel)' alias cdg=cdgit +alias gg="go get" +alias gt="go test" +alias gb="go build" alias ll="exa -l --group-directories-first --git" alias sysc="systemctl" alias zzz="sudo systemctl hibernate"