2

我的终端配置

 3 years ago
source link: https://cyberve.top/blog/terminal/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

我的终端配置

2018-04-21

作为一名前端开发,每天都要和终端打交道,所以配置一个舒适且符合自己需求的终端是很自然的事情,这是我目前每天都在使用的终端界面:

terminal

我使用了最流行的 iTerm2 + Oh My Zsh 方案。这套最基础的搭配相比 MacOS 自带的终端足以优化了我所有的使用场景。

首先是 iTerm2 设置菜单里的 Appearance - General - Theme 中,我选择了 Minimal,这使得功能栏和界面形成一体观感上不会被分割开。其他配置可以根据自己需求来更改。

在 Profiles 里,我自定义了颜色。游标样式为 Underline。字体为 Fira Code,你可以在这里下载到。背景添加了一点点的透明度。Status Bar 中添加了 Current Directory 和 Search Tool 组件,就是图片上界面最下面的两个组件。

我将 Profiles 配置上传到了 Github 仓库,如果只需更改颜色配置下载 2021my.itermcolors 文件导入即可。

接下来是 Oh My Zsh 的配置,装好后第一件事首先得将 shell 默认设置为 zsh,输入命令 chsh -s $(which zsh) 即可。配置文件存放在 ~/.zshrc 这个位置。ZSH_THEME 我设置为 agnoster。plugins 我添加了:

  • zsh-autosuggestions
  • zsh-syntax-highlighting
  • web-search

这是一个使用命令行快速下载插件的例子:git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

以上就是我所有的配置信息,记录下来也能方便我在新设备或者重装系统后能有一个快速的配置指引,之后配置有更改的话我也会及时更新这篇文章。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK