Mac的一些配置

安裝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,新建窗口的時(shí)候跟隨上次的目錄
②最新版iterm2自帶Solarized配色,直接在Preferences-Profiles-Colors-Color Presets中選擇就可以了
③Preferences-Profiles-Text-Cursor選擇Vertical Bar,光標(biāo)變成豎線
④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'

自動(dòng)補(bǔ)全

brew install bash-completion
#.bash_profile里添加
if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
fi

下載git自動(dòng)補(bǔ)全腳本

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

沒(méi)生效就重啟bash

Tmux

待續(xù)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容