aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pluggins.vim2
-rw-r--r--.vimrc13
-rw-r--r--.zsh_aliases4
-rw-r--r--.zshrc3
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 <ESC>
noremap Q <nop>
" remove command line window keybinding
noremap q: <nop>
-" incsearch
-map / <Plug>(incsearch-forward)
-map ? <Plug>(incsearch-backward)
-map g/ <Plug>(incsearch-stay)
+" search with very magic
+nnoremap / /\v
+nnoremap ? ?\v
" move line up and down
nnoremap _ ddkP
nnoremap + ddp
@@ -116,6 +115,12 @@ nnoremap <leader>src :source $MYVIMRC<cr>
" file toggle
nnoremap <leader>z zi
+" create c function body from prototype
+nnoremap gcf A<BS><CR>{<CR><CR>}<ESC>
+
+" put semicolon at the end of line
+nnoremap <leader>; mqA;<ESC>`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