From f9220da4926c74b434debe24569a95a417bd2697 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Mon, 15 Mar 2021 16:29:40 +0100 Subject: [PATCH] Various updates --- vim/after/ftplugin/go.vim | 7 +++++++ vimrc | 5 +++-- zshrc | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim index 09bede4..d7efbd4 100644 --- a/vim/after/ftplugin/go.vim +++ b/vim/after/ftplugin/go.vim @@ -1,10 +1,13 @@ nmap gb :GoBuild +nmap gr :GoRun nmap gc :GoCallers nmap gi :GoImplements nmap ^ :GoAlternate nmap gk :GoDocBrowser nmap gd :GoDecls nmap gD :GoDeclsDir +" mnemonic: match +nmap gm :GoSameIds nmap gv :vsplit:GoAlternate! nmap gs :split:GoAlternate! @@ -64,3 +67,7 @@ iabbrev errp ccif err != nil {fmt.Println(err)} iabbrev errr ccif err != nil {return err} iabbrev defr ccdefer func() {}()ki iabbrev []b []byte()i +iabbrev logd log.Debug().Msg(" +iabbrev logi log.Info().Msg(" +iabbrev loge log.Error().Msg(" +iabbrev logf log.Fatal().Msg(" diff --git a/vimrc b/vimrc index 463925a..30f07df 100644 --- a/vimrc +++ b/vimrc @@ -78,7 +78,7 @@ if exists('+termguicolors') endif " Colour scheme: -colorscheme nord +colorscheme iceberg augroup vimrc autocmd! @@ -151,7 +151,8 @@ inoremap pumvisible() ? "\" : "\" let g:vim_markdown_conceal = 1 " fzf configuration: -nmap t :GFiles +nmap t :Files +nmap T :GFiles nmap b :Buffers nmap gg :Rg diff --git a/zshrc b/zshrc index c2d4e37..e0b98e4 100644 --- a/zshrc +++ b/zshrc @@ -127,12 +127,15 @@ git config --global alias.st status git config --global alias.br branch # Other aliases +alias ll="exa -l --group-directories-first --git" alias sysc="systemctl" alias hib="sudo systemctl hibernate" alias dc="docker-compose -f docker-compose.yml" alias dcd="docker-compose -f docker-compose.yml -f docker-compose.development.yml" alias clp="tmux kill-pane" alias clw="tmux kill-window" +alias pk="pkill -fc" +alias pg="pgrep -fa" alias updatevimplugins="cd $HOME/.vim/pack/git-plugins && find . -mindepth 2 -maxdepth 2 -type d | xargs -I{} bash -c 'cd {} ; printf \"In {}...\"; git pull --rebase' ; cd -" # recursive grep with line numbers and colour, ignoring binary files: