第一步:
參考文章Mac下終端工具iTerm2安裝
第二步:
上述第一步的參考文章,第6步驟有異議,”聲明高亮“顯示。我的步驟如下:
1)、進入目錄
~/.oh-my-zsh/custom/plugins/
2)、在該目錄下, clone 高亮顯示的文件夾zsh-syntax-highlighting,執(zhí)行下面命令:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
3)、編輯 .zshrc文件,修改下面的指令。
vim ~/.zshrc
修改:plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
注意:我這里也安裝了zsh-autosuggestions這個插件,所以我這里要寫上。
4)、執(zhí)行命令使配置文件生效
source ~./zshrc
至此,iterm2在Mac上的安裝和配置完成。介紹幾個iterm2比較有用 的快捷命令:
command + t 新建標簽
command + w 關閉標簽
command + 數(shù)字 command + 左右方向鍵切換標簽
command + enter 切換全屏
command + f 查找
command + d 水平分屏
command + shift + d 垂直分屏
command + option + 方向鍵 command + [ 或 command + ] 切換屏幕
command + ; 查看歷史命令
command + shift + h 查看剪貼板歷史
ctrl + u 清除當前行
ctrl + l 清屏
ctrl + a 到行首
ctrl + e 到行尾
ctrl + f/b 前進后退
ctrl + p 上一條命令
ctrl + r 搜索命令歷史