自定义alias

1. 在自己的Home目录下新建alias文件: eirot@ubuntu64:~$ vim eirot.alias

# adb command

alias readb="adb shell stop && adb shell start"

alias reserver="adb kill-server && adb start-server"

alias reroot="adb shell setprop ro.debuggable 1"

alias rebootloader="adb reboot bootloader"

alias adbvedio="adb shell screenrecord /sdcard/bug.mp4"


# Compile relevant command

alias slunch="source build/envsetup.sh && lunch"

alias tmake="make -j8 2>&1 |tee build.log"

alias lra="cd /home/eirot/MyDev/lra/mt6735"


# Directory command

alias cd2="cd ../.."

alias cd3="cd ../../.."


# Git command

alias grebase="git pull --rebase"

alias gbv="git branch -vv"

alias gba="git branch -a"

alias gsl="git stash list"

alias gca="git commit --amend"

alias gdc="git diff --cached"

alias gitlog="git log --graph --pretty=format:'%Cgreen%h%Creset(%Cblue%cd%Creset)-%Cblue%an%Creset %Cgreen%s%Creset' --date=short"

alias pushlras12a="git push origin HEAD:refs/for/LRA01A-S12A"

alias pushlras13a="git push origin HEAD:refs/for/LRA01A-S13A"

alias pushfavos14a="git push origin HEAD:refs/for/FAVO02B-S14A"


2. 将新建alias文件添加到vim环境中去: eirot@ubuntu64:~$ vim ~/.bashrc

#add my alias file

if [ -f ~/eirot.alias ]; then

    . ~/eirot.alias

fi


3. 更新vim环境配置: eirot@ubuntu64:~$ source ~/.bashrc

你可能感兴趣的:(vim,alias)