icp网站备案核验单下载,全国工商企业查询网,微商代理怎么做,wordpress主题 粉色主要为了实现命令行颜色高亮与整个命令窗口半透明效果。 1、配色主题包下载
1、http://iterm2colorschemes.com/ 下载后解压#xff0c;到iterm2中#xff0c;左上角iTerm2-preferences-Profiles#xff0c;右侧面板找到Colors选项#xff0c;右下角展开Color Pr… 主要为了实现命令行颜色高亮与整个命令窗口半透明效果。 1、配色主题包下载
1、http://iterm2colorschemes.com/ 下载后解压到iterm2中左上角iTerm2-preferences-Profiles右侧面板找到Colors选项右下角展开Color Presets…拉到最下面选择import把下载解压好的配色主题包下的schemes下的所有.itermcolors文件导入导入完成后再展开Colors下拉列表即可选择不同的配色模板。2、只下载solarized配色模板 item2里好像自带这个配色模板导入后叫Solarized Dark和Solarized Light。 http://ethanschoonover.com/solarized 找到download下载后解压按上面同样方式导入iterm2-colors-solarized文件夹下的.itermcolors文件。
一般用Solarized Dark即可。
2、修改配置文件
sudo vim /etc/profile
这时候如果有权限问题sudo chmod 644 /etc/profile 在文件中追加
find_git_branch () {local dir. headuntil [ $dir -ef / ]; doif [ -f $dir/.git/HEAD ]; thenhead$( $dir/.git/HEAD)if [[ $head ref:\ refs/heads/* ]]; thengit_branch (${head#*/*/})elif [[ $head ! ]]; thengit_branch → (detached)elsegit_branch → (unknow)fireturnfidir../$dirdonegit_branch}PROMPT_COMMANDfind_git_branch; $PROMPT_COMMANDblack$\[\e[1;30m\]red$\[\e[1;31m\]green$\[\e[1;32m\]yellow$\[\e[1;33m\]blue$\[\e[1;34m\]magenta$\[\e[1;35m\]cyan$\[\e[1;36m\]white$\[\e[1;37m\]normal$\[\e[m\]PS1$white[$white$green\h$white:$cyan\W$yellow\$git_branch$white]\$ $normal
配置立刻生效
source /etc/profile
这时候颜色应该已经显示了。
3、透明度
透明度iterm2中左上角iTerm2-preferences-Profiles右侧找到window选项卡拖动Transparency调整.
4、安装oh-my-zsh
安装oh-my-zsh
sh -c $(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)
修改zsh配置文件
vi ~/.zshrc
ZSH_THEME”robbyrussell”修改为ZSH_THEME”agnoster” 重启items
安装字体
# clone 先克隆
git clone https://github.com/powerline/fonts.git
# install 后安装
cd fonts
./install.sh
iterm2中左上角iTerm2-preferences-Profiles右侧text选项卡Font和Non-ASCII Font都设置为 Meslo LG S DZ Regular for Powerline字体。 重启items
5、语法高亮插件
$ cd到.zshrc所在目录
$ git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
$ 打开 ~/.zshrc
# 添加下面的语句到.zshrc文件末尾source XXX/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# 注意xxx代表zsh-syntax-highlighting所在目录
# 再次打开.zshrc文件在最后面添加下面内容plugins(zsh-syntax-highlighting)
# 启用命令纠错功能ENABLE_CORRECTIONtrue
6、其他设置
设置菜单栏出现位置与主题iTerm2-preferences-Profiles-Appearance
设置iterm出现位置iTerm2-preferences-Profiles-window
设置显现和隐藏热键(option空格)iTerm2-preferences-Profiles-window
设置之后通过option空格就能切换iterm2的显示与隐藏。 最终效果