安裝brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
配置iterm2
①Preferences-Profiles-General-Working Directory選擇Resuse previous session's directory司浪,新建窗口的時候跟隨上次的目錄
②最新版iterm2自帶Solarized配色泊业,直接在Preferences-Profiles-Colors-Color Presets中選擇就可以了
③Preferences-Profiles-Text-Cursor選擇Vertical Bar,光標變成豎線
④Preferences-Profiles-Text啊易,去掉Draw bold text in bright colors吁伺,否則Solarized主題不生效
⑤Preferences-Keys-Hotkey,設(shè)置一組熱鍵用于顯示或隱藏
配置顏色
下載Solarized
git clone https://github.com/altercation/solarized
配置VIM顏色
$ cd solarized
$ cd vim-colors-solarized/colors
$ mkdir -p ~/.vim/colors
$ cp solarized.vim ~/.vim/colors/
$ vi ~/.vimrc 添加以下代碼
syntax on
set background=dark
colorscheme solarized
配置ls顏色
$ sudo brew install xz coreutils
$ gdircolors --print-database > ~/.dir_colors
$ vim ~/.bash_profile 添加以下代碼
if brew list | grep coreutils > /dev/null ; then
PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
alias ls='ls -F --show-control-chars --color=auto'
eval `gdircolors -b $HOME/.dir_colors`
fi
配置grep高亮
alias grep='grep --color'
alias egrep='egrep --color'
alias fgrep='fgrep --color'
配置自定義命令
alias ll='ls -al'
alias vi='vim'
自動補全
brew install bash-completion
#.bash_profile里添加
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
下載git自動補全腳本
cd /usr/local/Cellar/bash-completion/1.3_3/etc/bash_completion.d
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
brew unlink bash-completion && brew link bash-completion
沒生效就重啟bash
Tmux
待續(xù)