赣州网站建设咨询,哪里可以做免费的物流网站,做外贸网站方案,网页模板免费网址故事一开始是这样的#xff1a;
在装nginx的时候请教了一下后端的同事#xff0c;被嘲笑了一下#xff0c;黑白的界面如下图#xff0c;哈哈#xff0c;一直懒得弄。记录一下配置过程吧 刚开始的界面#xff1a;
一.首先是配置了一下终端的背景图#xff0c;自己选了一…故事一开始是这样的
在装nginx的时候请教了一下后端的同事被嘲笑了一下黑白的界面如下图哈哈一直懒得弄。记录一下配置过程吧 刚开始的界面
一.首先是配置了一下终端的背景图自己选了一个电影里的主题如下装B并没有什么卵用
1. 下载iTerm2
官网下载https://www.iterm2.com/
安装完成后在/bin目录下会多出一个zsh的文件。
Mac系统默认使用dash作为终端可以使用命令修改默认使用zsh
chsh -s /bin/zsh
2.iterm2----PreFerences--Profiles--window--Backgound image双击替换 效果如下 下面参考一位博友的吧懒得写了
3. 安装Oh my zsh
zsh的功能极其强大只是配置过于复杂,通过Oh my zsh可以很快配置zsh。
这里只做简单的配置,如需要深入了解,可以查看:《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开源地址《oh-my-zsh》 4. 安装PowerLine
首先先安装pip命令:
sudo easy_install pip pip是python的一个维护命令 安装powerline:
pip install powerline-status --user
5. 安装PowerFonts
在常用的位置新建一个文件夹如~/Desktop/OpenSource/
在OpenSource文件夹下下载PorweFonts:
# git clone
git clone https://github.com/powerline/fonts.git --depth1# cd to folder
cd fonts# run install shell
./install.sh
执行结果如下 安装好字体库之后我们来设置iTerm2的字体具体的操作是:
iTerm2 - Preferences - Profiles - Text
在Font区域选中Change Font然后找到Meslo LG字体。 6. 安装配色方案(可跳过)
在OpenSource目录下执行git clone命令:
git clone https://github.com/altercation/solarizedcd solarized/iterm2-colors-solarized/
open .
在打开的finder窗口中双击Solarized Dark.itermcolors和Solarized Light.itermcolors即可安装明暗两种配色 再次进入iTerm2 - Preferences - Profiles - Colors - Color Presets中根据个人喜好选择.
7. 安装主题
在OpenSource目录下执行git clone命令:
git 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 我这里简单说一下vim的一些操作命令,不熟悉的可以看看:
键盘i: 进入可编辑模式,最下面显示-- INSERT -- 键盘esc: 退出编辑模式
shift : : 执行命令操作
输入wq: 保存当前更改。如果仅仅退出不保存可以输入q
此时commandQ或source配置文件后iTerm2变了模样
https://raw.githubusercontent.com/sirius1024/pubimgs/master/blogs/iterm2/12.png
8. 安装高亮插件
这是oh my zsh的一个插件安装方式与theme大同小异
cd ~/.oh-my-zsh/custom/plugins/git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
vi ~/.zshrc
这时我们再次打开zshrc文件进行编辑。找到plugins此时plugins中应该已经有了git我们需要把高亮插件也加上
https://raw.githubusercontent.com/sirius1024/pubimgs/master/blogs/iterm2/13.png
请务必保证插件顺序zsh-syntax-highlighting必须在最后一个。
然后在文件的最后一行添加
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
按一下esc调出vi命令输入:wq保存并退出vi模式。
执行命令使刚才的修改生效
source ~/.zshrc
所有配置至此结束。下面提供另外的功能
9. 可选择、命令补全
跟代码高亮的安装方式一样这也是一个zsh的插件叫做zsh-autosuggestion用于命令建议和补全。
cd ~/.oh-my-zsh/custom/plugins/git clone https://github.com/zsh-users/zsh-autosuggestions
vi ~/.zshrc
找到plugins加上这个插件即可
https://raw.githubusercontent.com/sirius1024/pubimgs/master/blogs/iterm2/15.png
插件效果
https://raw.githubusercontent.com/sirius1024/pubimgs/master/blogs/iterm2/16.png
有同学说补全命令的字体不太清晰与背景颜色太过相近其实可以自己调整一下字体颜色。
Preferences - Profiles - Colors 中有Foreground是标准字体颜色ANSI Colors中Bright的第一个是补全的字体颜色。