iterm2 与 zsh 学习

iterm2 安装与使用

安装

    brew-cask iterm2

使用

  1. 选中即复制

    在 iterm2 中,选中就自动复制成功。

  2. 全文查找

    command + f

    支持正则,其中查找的内容会被自动复制。一般在使用时,键入搜索关键词,然后用shift-tab或者tab左右自动补全,option + enter则自动将搜索结果键入,并且复制到剪贴板。

  3. 分隔屏幕

    水平分隔:command +shift +d

    垂直分隔:command+d

    使用⌘ + ]和⌘ + [在最近使用的分屏直接切换.而⌘ + opt + 方向键切换到指定位置的分屏。

  4. 保存 ssh 远程登陆指令

  5. 自动补全命令

  6. 常用快捷键

    • 新建Tab          command + n
    • 关闭Tab          command + w
    • 切换Tab          command + number
    • 切换Tab          command + 方向键
    • 全屏                 command + enter
    • 清空当前行       ctrl + u
    • 到行首               ctrl + a
    • 到行末               ctrl + e
    • 前进后退            ctrl + f/b
    • 上一条命令         ctrl + p
    • 历史命令             ctrl + r
    • 删除当前字符      ctrl + d
    • 删除之前字符      ctrl + h
    • 删除光标前单词   ctrl + w
    • 删除到文本末尾   ctrl + k
    • 交换光标文本       ctrl + t
    • 清屏                     ⌘ + r
  7. 自定义快捷键

设为默认终端

(菜单栏)iTerm -> Make iTerm2 Default Term

zsh 安装与使用

安装

brew install wget
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh