From f4309c69498ae23959de904d38d23f6f8d667c09 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 6 Mar 2020 23:12:40 +0100 Subject: Few more aliases, autocomplete filetype ignore --- .pluggins.vim | 2 -- .vimrc | 13 +++++++++---- .zsh_aliases | 4 ++++ .zshrc | 3 +++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.pluggins.vim b/.pluggins.vim index 1c60958..c3951a5 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -6,10 +6,8 @@ call plug#begin() Plug 'tomtom/tcomment_vim' " mininal commenter Plug 'itchyny/lightline.vim' " minimal status bar - " bloat?? Plug 'romainl/vim-cool' " disable highlight after search - Plug 'haya14busa/incsearch.vim' " better incsearch Plug 'justinmk/vim-syntax-extra' " better syntax highlight Plug 'sheerun/vim-polyglot' " better syntax highlight call plug#end() diff --git a/.vimrc b/.vimrc index 6ff14c7..9d7059e 100644 --- a/.vimrc +++ b/.vimrc @@ -86,10 +86,9 @@ inoremap kj noremap Q " remove command line window keybinding noremap q: -" incsearch -map / (incsearch-forward) -map ? (incsearch-backward) -map g/ (incsearch-stay) +" search with very magic +nnoremap / /\v +nnoremap ? ?\v " move line up and down nnoremap _ ddkP nnoremap + ddp @@ -116,6 +115,12 @@ nnoremap src :source $MYVIMRC " file toggle nnoremap z zi +" create c function body from prototype +nnoremap gcf A{} + +" put semicolon at the end of line +nnoremap ; mqA;`q + " remove trailing white space on save autocmd BufWritePre * %s/\s\+$//e diff --git a/.zsh_aliases b/.zsh_aliases index 29a79b1..6644105 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -44,10 +44,14 @@ alias gds="git diff --staged" alias gl="git pull" alias glg="git log --stat" alias glgg="git log --graph" +alias glgo="git log --oneline --no-decorate" alias gp="git push" alias gcl="git clone --recurse-submodules" alias gst="git status" +alias gss="git status --short" alias gco="git checkout" +alias gsta="git stash push" +alias gstp="git stash pop" # lpass (lastpass-cli) alias lpassp="lpass show --password --clip" # put password in clipboard diff --git a/.zshrc b/.zshrc index 325f929..7512fcf 100644 --- a/.zshrc +++ b/.zshrc @@ -71,6 +71,9 @@ export TERM="xterm-256color" # set tab to 4 spaces tabs 4 +# ignore filetypes in autocomplete +fignore=(o hi) + # pluggins source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # prompt syntax highlight -- cgit