update vimrc and zshrc

This commit is contained in:
Rob Watson 2021-02-02 12:37:36 +01:00
parent 9ad91efded
commit a1f6b7d163
3 changed files with 13 additions and 5 deletions

View File

@ -42,6 +42,8 @@ iabbrev mk make([]MyType, 0)<esc>9h
iabbrev wr w http.ResponseWriter, r *http.Request iabbrev wr w http.ResponseWriter, r *http.Request
iabbrev fttt <ESC>ccfunc TestSomething(t *testing.T) {<cr>}<esc>k9l iabbrev fttt <ESC>ccfunc TestSomething(t *testing.T) {<cr>}<esc>k9l
iabbrev ttt t *testing.T iabbrev ttt t *testing.T
iabbrev errp <esc>ccif err != nil {<cr>panic(err)<cr>} iabbrev errP <esc>ccif err != nil {<cr>panic(err)<cr>}
iabbrev errf <esc>ccif err != nil {<cr>log.Fatal(err)<cr>} iabbrev errl <esc>ccif err != nil {<cr>log.Println(err)<cr>}
iabbrev errl <esc>ccif err != nil {<cr>fmt.Println(err)<cr>} iabbrev errp <esc>ccif err != nil {<cr>fmt.Println(err)<cr>}
iabbrev errr <esc>ccif err != nil {<cr>return err<cr>}
iabbrev defr <esc>ccdefer func() {<cr><cr>}()<esc>ki

7
vimrc
View File

@ -21,7 +21,7 @@ command! -nargs=0 -bar Helptags
set shiftwidth=2 set shiftwidth=2
set shiftround set shiftround
" set tabstop=8 set tabstop=2
set expandtab set expandtab
" set smarttab " set smarttab
set splitbelow set splitbelow
@ -172,6 +172,10 @@ nmap [h <Plug>(GitGutterPrevHunk)
" Vim-Rust configuration: " Vim-Rust configuration:
let g:rustfmt_autosave = 1 let g:rustfmt_autosave = 1
" echodoc configuration:
set cmdheight=2
let g:echodoc#enable_at_startup = 1
" ALE configuration: " ALE configuration:
function SymbolSearch() function SymbolSearch()
call inputsave() call inputsave()
@ -245,6 +249,7 @@ runtime macros/matchit.vim
packadd! ale packadd! ale
" load other plugins: " load other plugins:
packadd! echodoc.vim
packadd! lightline.vim packadd! lightline.vim
packadd! tmux-complete.vim packadd! tmux-complete.vim
packadd! vim-commentary packadd! vim-commentary

3
zshrc
View File

@ -68,7 +68,7 @@ ZSH_THEME="gianu"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=(git history-substring-search) plugins=(git history-substring-search docker docker-compose golang)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
@ -129,6 +129,7 @@ git config --global alias.br branch
# Other aliases # Other aliases
alias sysc="systemctl" alias sysc="systemctl"
alias hib="sudo systemctl hibernate" 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 dcd="docker-compose -f docker-compose.yml -f docker-compose.development.yml"
alias tkp="tmux kill-pane" alias tkp="tmux kill-pane"
alias tkw="tmux kill-window" alias tkw="tmux kill-window"