良好的 Shell 與編輯器設定,能明顯提升開發效率。以下整理常見的 .bashrc、.vimrc 與 .gitconfig 設定。
alias ls='ls -G --color=auto'
alias ll='ls -alhT'
alias grep='grep --color=auto'
function jgrep() {
find . -iname "*.java" -print0 | xargs -0 grep --color -n "$@"
}
function xmlgrep() {
find . -iname "*.xml" -print0 | xargs -0 grep --color -n "$@"
}set nu syntax enable set background=dark set ignorecase
[user] name = xxxx email = xxxx@yyy.com [alias] st = status br = branch [color] ui = auto
這些設定可作為個人環境的起點,再依需求微調。