打造高效个性Terminal(一)之 iTerm
前言
作为一个集效率控、颜值控、强迫症患者标签于一身的患者,对待自己工作用到的Terminal,自然是诸多要求。本文首先会讲一下怎么弄一个高颜值、个性化的Terminal,然后再说说怎么利用一些工具来提高Terminal的效率。
PS:文末有彩蛋。
iTerm
简介 Introduction
iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with OS X 10.8 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.
iTerm是一款免费的,专为Mac OS用户打造的命令行应用。作为系统自带Terminal的替代,它提供了很多方便且极客的功能。诸如隔离的面板、透明窗口、强大的正则表达式搜索、自动补全等、剪贴板历史记录,快照返回等功能,更多iTerm的特性见iTerm Feature。
下载见官网(http://www.iterm2.com/),如果你不是Mac用户,那就跳过iTerm,直接看提高效率的oh-my-zsh
塑造高颜值Terminal
iTerm吸引我的地方,除了各种方面的特性之外,就是炫酷可定制的界面。
满足我的视觉强迫症之外还可以提供方便的功能,应当是每个MacOS程序员必备的利器。
对于使用命令行,我一般会有两个这样的使用场景
一、快速打开,执行一两条命令,然后关闭,诸如打开文件,启动服务等等。
二、长时间使用命令行,诸如调试程序,VIM编程等等。
对于第一种情况,我希望是可以通过快捷键快速的打开命令行,然后同样的快捷键快速的隐藏它,直到我需要的时候再次来到我面前。
而第二种情况,我希望是可以和正常的命令窗口界面那样,让我安安静静的调试程序。
所以,在iTerm,我会建两个Profile配置。
第一种Profile

第二种Profile

一步一步往前走
Step.1 创建第一种Profile
首先在Preperence → Profiles,建立一个Profiles, 取名HotKey Window

Step.2 背景透明与模糊设置
在Preperence → Profiles → Window → Window Appearance 进行设置

Step.3 窗口风格配置
在Preperence → Profiles → Window → Settings for New Windows 进行设置

Step.4 设置HotKey
在Preperence → Profiles → Keys → HotKey 进行设置

到目前为止,第一种Profile配置完成,你可以按下你设置的HotKey来方便快速打开和隐藏命令行。
如果你需要打开一个会长时间使用的命令行窗口的话,按下cmd + n,但是你会发现窗口的样式又回到默认的了,所以下面进行第二个Profiles的配置。
Step.5 创建第二个Profile
我们只需要在第一个窗口的基础上,进行「窗口风格」配置就可以了。
在Preperence → Profiles,复制HotKey Window, 取名Default of Hotkey Window

Step.6 窗口风格配置
在Preperence → Profiles → Window → Settings for New Windows 进行设置

Step.7 设置默认
在Preperence → Profiles 中,选中 Default of HotKey Window, 并设置为默认

自此,就完成了两种Profile的设置。
常用功能快捷键
在使用iTerm的过程中,下面对于控制窗口的快捷键使用频率会很高,不用记,用多了就形成肌肉记忆了。
cmd + n : 新建窗口
cmd + t : 新建TAB
cmd + d : 垂直新建TAB
cmd + shift + d : 水平新建TAB
打造高效个性Terminal(一)之 iTerm
2016-08-11 | JerryC | 搬砖码农
前言
作为一个集效率控、颜值控、强迫症患者标签于一身的患者,对待自己工作用到的Terminal,自然是诸多要求。本文首先会讲一下怎么弄一个高颜值、个性化的Terminal,然后再说说怎么利用一些工具来提高Terminal的效率。
PS:文末有彩蛋。
iTerm
简介 Introduction
iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with OS X 10.8 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.
iTerm是一款免费的,专为Mac OS用户打造的命令行应用。作为系统自带Terminal的替代,它提供了很多方便且极客的功能。诸如隔离的面板、透明窗口、强大的正则表达式搜索、自动补全等、剪贴板历史记录,快照返回等功能,更多iTerm的特性见iTerm Feature。
下载见官网(http://www.iterm2.com/),如果你不是Mac用户,那就跳过iTerm,直接看提高效率的oh-my-zsh
塑造高颜值Terminal
iTerm吸引我的地方,除了各种方面的特性之外,就是炫酷可定制的界面。
满足我的视觉强迫症之外还可以提供方便的功能,应当是每个MacOS程序员必备的利器。
对于使用命令行,我一般会有两个这样的使用场景
一、快速打开,执行一两条命令,然后关闭,诸如打开文件,启动服务等等。
二、长时间使用命令行,诸如调试程序,VIM编程等等。
对于第一种情况,我希望是可以通过快捷键快速的打开命令行,然后同样的快捷键快速的隐藏它,直到我需要的时候再次来到我面前。
而第二种情况,我希望是可以和正常的命令窗口界面那样,让我安安静静的调试程序。
所以,在iTerm,我会建两个Profile配置。
第一种Profile

第二种Profile

一步一步往前走
Step.1 创建第一种Profile
首先在Preperence → Profiles,建立一个Profiles, 取名HotKey Window

Step.2 背景透明与模糊设置
在Preperence → Profiles → Window → Window Appearance 进行设置

Step.3 窗口风格配置
在Preperence → Profiles → Window → Settings for New Windows 进行设置

Step.4 设置HotKey
在Preperence → Profiles → Keys → HotKey 进行设置

到目前为止,第一种Profile配置完成,你可以按下你设置的HotKey来方便快速打开和隐藏命令行。
如果你需要打开一个会长时间使用的命令行窗口的话,按下cmd + n,但是你会发现窗口的样式又回到默认的了,所以下面进行第二个Profiles的配置。
Step.5 创建第二个Profile
我们只需要在第一个窗口的基础上,进行「窗口风格」配置就可以了。
在Preperence → Profiles,复制HotKey Window, 取名Default of Hotkey Window

Step.6 窗口风格配置
在Preperence → Profiles → Window → Settings for New Windows 进行设置

Step.7 设置默认
在Preperence → Profiles 中,选中 Default of HotKey Window, 并设置为默认

自此,就完成了两种Profile的设置。
常用功能快捷键
在使用iTerm的过程中,下面对于控制窗口的快捷键使用频率会很高,不用记,用多了就形成肌肉记忆了。
cmd + n : 新建窗口
cmd + t : 新建TAB
cmd + d : 垂直新建TAB
cmd + shift + d : 水平新建TAB
网友评论