# 移动 h 光标向左移动一个字符 j 或 Ctrl + J 光标向下移动一行 k 或 Ctrl + P 光标向上移动一行 l 光标向右移动一个字符 0 (数字 0)移动光标至本行开头 $ 移动光标至本行末尾 ^ 移动光标至本行第一个非空字符处 w 向前移动一个词 (上一个字母和数字组成的词之后) W 向前移动一个词 (以空格分隔的词) 5w 向前移动五个词 b 向后移动一个词 (下一个字母和数字组成的词之前) B 向后移动一个词 (以空格分隔的词) 5b 向后移动五个词 G 移动至文件末尾 gg 移动至文件开头
# 插入 a 在光标后插入文本 A 在行末插入文本 i 在光标前插入文本 o (小写字母 o)在光标下方新开一行 O (大写字母 O)在光标上方新开一行 :r [filename] 在光标下方插入文件 [filename] 的内容 :r ![command] 执行命令 [command] ,并将输出插入至光标下方
# add alias ga='git add' alias gaa='git add --all' alias gapa='git add --patch' alias gau='git add --update' alias gav='git add --verbose'
# branch alias gb='git branch' alias gba='git branch -a' alias gbd='git branch -d' alias gbD='git branch -D' alias gbl='git blame -b -w' alias gbnm='git branch --no-merged' alias gbr='git branch --remote' alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*($(git_main_branch)|development|develop|devel|dev)\s*$)" | command xargs -n 1 git branch -d'
alias gco='git checkout' alias gcb='git checkout -b' alias gcm='git checkout $(git_main_branch)' alias gcd='git checkout develop'
alias gsw='git switch' alias gswc='git switch -c'
# commit alias gc='git commit -v' alias gc!='git commit -v --amend' alias gcn!='git commit -v --no-edit --amend' alias gca='git commit -v -a' alias gca!='git commit -v -a --amend' alias gcan!='git commit -v -a --no-edit --amend' alias gcans!='git commit -v -a -s --no-edit --amend' alias gcam='git commit -a -m' alias gcsm='git commit -s -m' alias gcs='git commit -S'
# diff alias gd='git diff' alias gdca='git diff --cached' alias gdcw='git diff --cached --word-diff' alias gds='git diff --staged' alias gdt='git diff-tree --no-commit-id --name-only -r' alias gdw='git diff --word-diff'
# pull alias gl='git pull' alias gup='git pull --rebase' alias gupv='git pull --rebase -v' alias gupa='git pull --rebase --autostash' alias gupav='git pull --rebase --autostash -v' alias glum='git pull upstream $(git_main_branch)' alias ggpull='git pull origin "$(git_current_branch)"'
# push alias gp='git push' alias gpd='git push --dry-run' alias gpf='git push --force-with-lease' alias gpf!='git push --force' alias gpoat='git push origin --all && git push origin --tags' alias gpu='git push upstream' alias gpv='git push -v' alias ggpush='git push origin "$(git_current_branch)"' alias gpsup='git push --set-upstream origin $(git_current_branch)'
# log alias glg='git log --stat' alias glgp='git log --stat -p' alias glgg='git log --graph' alias glgga='git log --graph --decorate --all' alias glgm='git log --graph --max-count=10' alias glo='git log --oneline --decorate' alias glog='git log --oneline --decorate --graph' alias gloga='git log --oneline --decorate --graph --all' alias glp="_git_log_prettily" alias glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'" alias glols="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat" alias glod="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'" alias glods="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short" alias glola="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all"
# merge alias gm='git merge' alias gmom='git merge origin/$(git_main_branch)' alias gmum='git merge upstream/$(git_main_branch)' alias gma='git merge --abort'
# rebase alias grb='git rebase' alias grba='git rebase --abort' alias grbc='git rebase --continue' alias grbd='git rebase develop' alias grbi='git rebase -i' alias grbm='git rebase $(git_main_branch)' alias grbs='git rebase --skip'
# reset alias grh='git reset' alias grhh='git reset --hard' alias groh='git reset origin/$(git_current_branch) --hard' alias gru='git reset --'
# revert alias grev='git revert'
# status alias gst='git status' alias gss='git status -s' alias gsb='git status -sb'
# stash alias gstc='git stash clear' alias gstd='git stash drop' alias gstl='git stash list' alias gstp='git stash pop' alias gsts='git stash show --text' alias gstu='git stash --include-untracked' alias gstall='git stash --all'
Karabinder
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# 移动 hjkl - ⬅️⬇️⬆️➡️ e #下一个单词 b #上一个单词 0 ,{ #行首 $ ,} #行尾 ^ #在行首空格前后跳转 gg #文件头 G #文件尾 y c x dd,de,db,d0,d^ d$ dgg dG d{ d} yy y+移动 cc c+移动