# gvim alias g='gvim' alias go='gvim -o' alias gO='gvim -O' alias gp='gvim -p' alias gbash='gvim ~/.bashrc' gm() { gvim -p *$1* } # dir cdls() { \cd $1 ls } cdm() { cd *$1* } llm() { ll -d *$1* } alias cd='cdls' alias .='cd ..' alias ..='cd ../..' alias ...='cd ../../..' alias ....='cd ../../../..' alias cc='clear clear clear' alias du1='du -h --max-depth=1' alias llt='ll -tr' alias grep='grep -r -n --exclude-dir='.svn' --color=auto' # set terminal title stt() { if [[-z "$ORIG"]]; then ORIG=$PS1 fi TITLE="\[\e]2;$*\a]" PS1=${ORIG}${TITLE} } # batch replacement file name, usage: cmd name1 name2 exchange_file_name() { find $1* | xargs -i echo mv \"{}\" \"{}\" | sed s/$1/$2/2g | sh } # repleacement string of all files in this dir exchange_string() { sed -i s/$1/$2/g * } # find latest folder find_latest_folder() { folder_name_s='' for i in `ls -tr` do folder_name_s=$i done; echo 'open latest folder: '$folder_name_s } # svn alias sl='svn_log5' alias sll='svn_log10' alias svndk='svndk' svn_log5() { svn log -l 5 $1 } svn_log10() { svn log -l 10 $1 } svn_delete_keep() { svn delete --keep-local $1 }