同步自本人独立博客:https://liushiming.cn/2020/01/15/awesome-iterm2-config/git
iterm2
比mac原生的terminal好用不少,是mac下必装的软件之一,装好后简单配置就用的很爽了。我我的的配置主要有如下方面,供参考:github
opton + space
方便随时唤起iterm2
macOS
10.15.2vim
iterm2
3.3.7windows
System Preferences > Users & Groups > Login Items > 点加号 > Applications列表选中iTerm
ide
Preferences > Profiles > Colors > Color Presets > 选择Solarized Dark
gitlab
之因此选择这个颜色,由于这个颜色(姑且称为哑光淡蓝色吧),在不少支持配色的软件里都有,是一个经典配色了,并且我vscode也是这个颜色
字体
Preferens > Profiles > Text > 勾上Use a different font for non-ASCII text > 选择本身喜欢的字体
spa
iterm的默认字体是Monaco,Monaco的中文原本也还行,可是若是将字体放大一点,会发现英文字体变大了,可是中文看起来比英文还小。命令行
好在iterm支持为非ASCII的字符设置另外一种字体,因此我选择了Helvetica Neue(和Mac下印象笔记的字体一致,相信他们的专业审美),看起来好多了。
code
实际效果:
Preferences > Keys > Hotkey > 勾上Show/hide all windows with a system-wide hotkey
默认快捷键是option + space
,用起来很顺手,在任何界面须要敲命令行,按一下唤出,再按一下隐藏,很是方便。
默认iterm2是开启mouse reporting
功能的,不把它关闭鼠标选中vim中的文本,按command + c
键是不能复制的(而是会进入vim的visual模式!)。我查了好久才在iterm2的官方gitlab库中搜到一个issue说到这个解决方案。网上基本上没有说法。
Preferens > Profiles > Terminal > 关闭Enable mouse reporting
关闭mouse reporting
后,vim编辑时就不支持鼠标滚动了,可是iterm2能够设置经过发送j/k键来支持滚动,iterm2 > preferences > advance > 搜索mouse > scroll whell down 那里写\j > scroll whell up那里写\k
本身的配置最好备份好,下次有须要再导入便可,体验保持一致。
Preferences > Profiles > Other Actions > Save All Profiles as JSON...
导出的配置文件能够放到dotfiles上传到github保存(但若是保存了密码之类的配置就不要上传了),换电脑的时候不再用担忧软件用不顺手了。