高效MacBook工作环境配置

iTerm2

 

Mac OS自带的终端,用起来虽然有些不太方便,界面也不够友好,iTerm2是一款相对比较好用的终端工具.iTerm2常用操作包括主题选择、声明高亮、自动填充建议、隐藏用户名和主机名、分屏效果等。

 

iTerm2 设置

 

  1. iTerm2 => Make iTerm2 Default Term
  1. iTerm2 => Preferences => Profiles
    General
    Color
    Text
 Working Directory => Reuse previous session's directory
 Color Presets... => Solarized Dark
 Change Font => Meslo LG M Regular for Powerline
 (下载地址:https://github.com/powerline/fonts/blob/master/Meslo%20Slashed/Meslo%20LG%20M%20Regular%20for%20Powerline.ttf)

 

Homebrew

 

Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。

 

  1. xcode-select --install
  1. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

Oh My Zsh

 

Mac系统默认使用dash作为终端,可以使用命令修改默认使用zsh:

 

chsh -s /bin/zsh

 

安装:

 

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

 

安装autojump

 

brew install autojump

 

zshrc新增

 

[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

 

zsh-syntax-highlighting

 

brew install zsh-syntax-highlighting

 

配置.zshrc文件,插入一行。

 

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

 

plugins

 

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

 

修改zshrc

 

plugins=(git) => plugins=(zsh-autosuggestions git)

 

生效配置 source ~/.zshrc

2019-12-17 11:20
247
0
 
 
漫思
原文地址:https://www.cnblogs.com/sexintercourse/p/15235613.html