呼和浩特网站建设哪家最便宜,用阿里云做网站会不会被黑,门户网站开发要求,公司注册网址怎么弄最终效果图#xff1a; 因为powerline以及homebrew均需要安装command line tool#xff0c;网络条件优越的同学在执行本文下面内容之前#xff0c;可以先安装XCode并打开运行一次#xff08;会初始化安装components#xff09;#xff0c;省去以后在iterm2中的等待时间。…最终效果图 因为powerline以及homebrew均需要安装command line tool网络条件优越的同学在执行本文下面内容之前可以先安装XCode并打开运行一次会初始化安装components省去以后在iterm2中的等待时间。 另外git也是必要的各位可以自行下载安装除了网络没有任何坑 https://git-scm.com 介于此本文默认各位同学已经安装了git环境和xcodecommand line tools遇到提示找不到git命令或需要安装command line tool的地方文中不再赘述了。 下载iTerm2 可以直接去官网下载https://www.iterm2.com/ 安装完成后在/bin目录下会多出一个zsh的文件。 Mac系统默认使用dash作为终端可以使用命令修改默认使用zsh chsh -s /bin/zsh 如果想修改回默认dash同样使用chsh命令即可 chsh -s /bin/bash OK这就是iTerm2初始的样子下面我们来美化它让它变得更好用 安装Oh my zsh 安装方法有两种可以使用curl或wget看自己环境或喜好 # curl 安装方式sh -c $(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh) # wget 安装方式sh -c $(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -) 安装命令和安装完成后的截图 oh-my-zsh开源地址https://github.com/robbyrussell/oh-my-zsh 安装PowerLine Powerline是agnoster主题的依赖。具体可以在repo里查询到 https://github.com/agnoster/agnoster-zsh-theme powerline官网http://powerline.readthedocs.io/en/latest/installation.html 安装powerline的方式依然简单也只需要一条命令 pip install powerline-status --user 没有安装pip的同学可能会碰到zsh: command not found: pip。 使用命令安装pip即可 sudo easy_install pip 安装后再次执行安装powerline的命令即可。 安装PowerFonts 安装字体库需要首先将项目git clone至本地然后执行源码中的install.sh。 在你习惯的位置新建一个文件夹如~/Desktop/OpenSource/ 在此文件夹下执行git clone命令 # git clonegit clone https://github.com/powerline/fonts.git --depth1# cd to foldercd fonts# run install shell./install.sh 执行结果如下 安装好字体库之后我们来设置iTerm2的字体具体的操作是iTerm2 - Preferences - Profiles - Text在Font区域选中Change Font然后找到Meslo LG字体。有L、M、S可选看个人喜好 安装配色方案 配色方案在使用VIM或Colorful Log时会变得非常有用同时界面也不会一片黑绿一样死板。 同样使用git clone的方式下载源码进行安装 cd ~/Desktop/OpenSourcegit clone https://github.com/altercation/solarizedcd solarized/iterm2-colors-solarized/open . 在打开的finder窗口中双击Solarized Dark.itermcolors和Solarized Light.itermcolors即可安装明暗两种配色 再次进入iTerm2 - Preferences - Profiles - Colors - Color Presets中根据个人喜好选择这两种配色中的一种即可 安装主题 下载agnoster主题执行脚本安装 cd ~/Desktop/OpenSourcegit clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor.gitcd oh-my-zsh-agnoster-fcamblor/./install 执行上面的命令会将主题拷贝到oh my zsh的themes中 拷贝完成后执行命令打开zshrc配置文件将ZSH_THEME后面的字段改为agnoster。 vi ~/.zshrc 修改完成后按一下esc调出vi命令输入:wq保存并退出vi模式。 此时commandQ或source配置文件后iTerm2变了模样 安装高亮插件 这是oh my zsh的一个插件安装方式与theme大同小异 cd ~/.oh-my-zsh/custom/plugins/git clone https://github.com/zsh-users/zsh-syntax-highlighting.gitvi ~/.zshrc 这时我们再次打开zshrc文件进行编辑。找到plugins此时plugins中应该已经有了git我们需要把高亮插件也加上 请务必保证插件顺序zsh-syntax-highlighting必须在最后一个。 然后在文件的最后一行添加source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 按一下esc调出vi命令输入:wq保存并退出vi模式。 执行命令使刚才的修改生效 source ~/.zshrc 至此大功告成请看最终效果图 背景图片取自微软Surface Studio的4K壁纸(将近12MB大小)非常漂亮需要的可以自取 https://pan.baidu.com/s/1LKd4ghGyyNI6UwHhOHvfaA 提取码: snrd 更换背景图片方式iTerm2 - Preferences - Profiles - Window - BackGround Image勾选图片即可。 可选择、命令补全 跟代码高亮的安装方式一样这也是一个zsh的插件叫做zsh-autosuggestion用于命令建议和补全。 cd ~/.oh-my-zsh/custom/plugins/git clone https://github.com/zsh-users/zsh-autosuggestionsvi ~/.zshrc 找到plugins加上这个插件即可 插件效果 有同学说补全命令的字体不太清晰与背景颜色太过相近其实可以自己调整一下字体颜色。 Preferences - Profiles - Colors 中有Foreground是标准字体颜色ANSI Colors中Bright的第一个是补全的字体颜色。 本文由 mdnice 多平台发布