mac 终端配置

Mac iTerm2 配置

安装

brew install iTerm2

安装完成之后,需要重新打开终端,既可以看见安装 iTerm2 的效果。

iTerm2 美化

使用 oh-my-zsh 美化 iTerm2 终端

  1. 安装

    brew install wget

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

  2. sh 下载失败时,手动去 github 仓库下载,放到 用户目录 下的 .oh-my-zsh 文件夹中去

    # clone源码: 
    git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh 
    # 复制创建.zshrc: 
    cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 
    # 让.zshrc生效: 
    source ~/.zshrc 
    # (可选)shell切换成 zsh: 
    chsh -s /bin/zsh
    
  3. 执行之后,发现 zsh 发生了变化,即 oh-my-zsh 安装完成。

  4. 配置 zsh 主题

    # 打开.zshrc
    vim ~/.zshrc
    # 找到 ZSH_THEME 这一行
    # 修改为 ZSH_THEME="ys" (也可以使用ys)
    # wq保存退出
    # 使修改生效
    source ~/.zshrc
    
  5. 安装 powerline 解决字体渲染问题

    pip3 install --user powerline-status
    
  6. 安装字体

    # clone
    git clone https://github.com/powerline/fonts.git --depth=1
    # install
    cd fonts && ./install.sh
    # clean-up a bit
    cd .. && rm -rf fonts
    
  7. 安装插件

    语法高亮

    cd ~/.oh-my-zsh/custom/plugins/
    git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
    vim ~/.zshrc
    找到plugins 加上 zsh-syntax-highlighting
    

    命令补全

    cd ~/.oh-my-zsh/custom/plugins/
    git clone https://github.com/zsh-users/zsh-autosuggestions
    vim ~/.zshrc
    找到plugins 加上 zsh-autosuggestions
    
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值