做者:studytime
原文: https://www.studytime.xin/
安装iTerm2比较简单,直接从官网下载安装便可。安装好以后,咱们还须要进行一系列的设置才行。php
iTerm2支持许多的主题配色,能够本身定义,也能够参考网上现成的主题配色。我我的比较喜欢draculatheme配色。支持item,vim,phpstorm , 下方存在主题官网路径,按照教程安装便可。html
下面是一些经常使用的主题配色的预设置文件:git
这些配色预设置文件,能够直接导入到iTerm2中,而后能够直接在设置中选择:github
区分目录和文件的颜色设置:vim
Preferences -> Profiles -> Text -> Text Rendering 把 Draw bold text in bright colors
前面的勾去掉,
文件和目录能够很容易区分了……ssh
经过在.zshrc中配置alias,能够方便的为其余的命令设置别名,这是个很不错的功能.curl
vim ~/.zshrc
phpstorm
# For server #alias weiyidev = "ssh weiyidev" #alias studytime = "ssh studytime" # For git alias gs="git status" alias ga='git add' alias gd='git diff' alias gf='git fetch' alias grv='git remote -v' alias gbr='git branch' alias gpl="git pull" alias gps="git push" alias gco="git checkout" alias gl="git log" alias gc="git commit -m" alias gm="git merge" # For local alias cd..="cd .." alias cd...="cd ../.." alias cd....="cd ../../.." alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.." alias ip="curl ip.cn"
source ~/.zshrc
ide
Zsh支持目录的快速跳转,咱们能够使用 d
这个命令,列出最近访问过的各个目录,而后选择目录前面的数字进行快速跳转:fetch
指令高亮效果做用是当用户输入正确命令时指令会绿色高亮,错误时命令红色高亮
切入扩展目录 cd ~/.oh-my-zsh/custom/plugins 执行指令将工程克隆到当前目录 git clone git://github.com/zsh-users/zsh-syntax-highlighting.git 打开`.zshrc`文件,在最后添加下面内容 vim ~/.zshrc 添加代码 source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh plugins=(zsh-syntax-highlighting) 保存文件。 执行 source ~/.zshrc
切入扩展目录 cd ~/.oh-my-zsh/custom/plugins 执行指令将工程克隆到当前目录 git clone git://github.com/zsh-users/zsh-autosuggestions 打开.zshrc文件,在最后添加下面内容 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh plugins=(zsh-autosuggestions) 保存文件。 cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions vim zsh-autosuggestions.zsh 修改 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10' source ~/.zshrc
更多精彩内容,请关注做者博客,https://studytime.xin