iTerm2 for MacOS(终端模拟器/终端仿真器/命令终端工具)设置详解
文章目錄
- General 通用
- Startup 啟動(dòng)
- Closing 關(guān)閉
- Magic
- Selection
- Window
- tmux
- Appearance
- General
- 隱藏程序圖標(biāo)
- theme 主題
- tab bar location 選項(xiàng)卡欄位置
- status bar location狀態(tài)欄位置
- Windows
- Tabs
- Panes
- Dimming 調(diào)光
- Profiles 配置文件
- General
- 自定義終端界面的標(biāo)志
- 自定義標(biāo)簽頁(yè)標(biāo)題
- Shortcut Key
- Command
- Login Shell
- Command
- Custom Shell 配置 Shell 類(lèi)型
- Working Directory 設(shè)置工作目錄
- Colors
- 自定義配色方案
- Text 文本
- Cursor 樣式
- Window
- Settings for New Windows 新窗口的設(shè)置
- Style 風(fēng)格
- Screen 屏幕
- Space 空間
- Terminal
- Shell Integration.Shell 集成
- Session 會(huì)話
- Keys
- Hotkey Window 設(shè)置熱鍵
- Advanced 高級(jí)
- Keys 鍵映射
- Navigation Shortcuts
- Remap Modifiers 重新映射修改器
- Pointer 指針 指示器
iTerm2 is a terminal emulator for Mac OS X that does amazing things.
官網(wǎng):https://iterm2.com/index.html
General 通用
Startup 啟動(dòng)
Window restoration policy.窗口恢復(fù)策略
Only restore hotkey window.僅恢復(fù)熱鍵窗口
Open profiles window.打開(kāi)配置文件窗口
Closing 關(guān)閉
Confirm “Quit iTerm2”.確認(rèn)“退出iTerm2”
even if there are no windows.即使沒(méi)有窗口
Magic
Instant Replay uses 4MB per session.每個(gè)會(huì)話即時(shí)重放的大小是 4 MB
Save copy/paste and command history to disk.將復(fù)制/粘貼和命令歷史記錄保存到磁盤(pán)
GPU rendering.GPU渲染
Disable GPU renderer when disconnected from power.斷開(kāi)電源連接時(shí)禁用GPU渲染器
Maximize throughput(may increase latency).最大化吞吐量(可能增加延遲)
Prefer integrated to discrete GPU.集成GPU優(yōu)于離散GPU
Selection
Copy to pasteboard on selection.選擇時(shí)復(fù)制到粘貼板
Copied text includes trailing newline.復(fù)制的文本包括末尾的換行符
Applications in terminal may access clipboard.終端中的應(yīng)用程序可以訪問(wèn)剪貼板
Triple-click selects entire wrapped lines.三次單擊選擇整個(gè)包裹線
Double-click performs smart selection.雙擊執(zhí)行智能選擇
Automatically enter copy mode on Shift + Arrow key with selection.按Shift+箭頭鍵選擇后自動(dòng)進(jìn)入復(fù)制模式
Characters considered part of a word.被認(rèn)為是單詞一部分的字符
Window
Smart window placement.智能窗口放置
Adjust window when changing font size.更改字體大小時(shí)調(diào)整窗口
Zoom maximizes vertically only.縮放僅垂直最大化。如果勾選這個(gè),雙擊窗口標(biāo)題欄時(shí)會(huì)垂直方向最大化,但是水平方向則沒(méi)有縮放
Native full screen windows.本地全屏窗口
Separate window title per tab.每個(gè)選項(xiàng)卡都有單獨(dú)的窗口標(biāo)題。
tmux
Appearance
General
隱藏程序圖標(biāo)
Exclude from Dock and ? -Tab Application Switcher.表示 iTerm2 程序圖標(biāo)不會(huì)出現(xiàn)在 Dock 和 Application Switcher 中。
theme 主題
regular.常規(guī)的
minimal.極簡(jiǎn)的
compact.緊湊的
light.明亮的
dark.深色的
light(high contrast).明亮且高對(duì)比度的
dark(high contrast).深色且高對(duì)比度的
tab bar location 選項(xiàng)卡欄位置
status bar location狀態(tài)欄位置
auto-hide menu bar in non-native fullscreen.在非本地全屏?xí)r自動(dòng)隱藏菜單欄
exclude from dock and tab application switcher.從 dock 和 <?-tab> 應(yīng)用程序切換器中排除
… but only if all windows are hotkey windows.但前提是所有窗口都是熱鍵窗口
Windows
show window number in title bar.在標(biāo)題欄中顯示窗口編號(hào)
show border around windows.顯示窗口周?chē)倪吙?br /> hide scrollbars.隱藏滾動(dòng)條
disable transparency for fullscreen windows by default.默認(rèn)情況下禁用全屏窗口的透明度
show line under title bar when the tab bar is not visible.當(dāng)選項(xiàng)卡欄不可見(jiàn)時(shí),在標(biāo)題欄下顯示行
show proxy icon in window title bar.在窗口標(biāo)題欄中顯示代理圖標(biāo)
Tabs
Show tab bar even when there is only one tab.即使只有一個(gè)選項(xiàng)卡,也顯示選項(xiàng)卡欄
Preserve window size when tab bar shows or hides.在選項(xiàng)卡欄顯示或隱藏時(shí)保留窗口大小。
Show tab numbers.顯示選項(xiàng)卡標(biāo)簽編號(hào)
Tabs have close buttons.選項(xiàng)卡有關(guān)閉按鈕
Show activity indicator.顯示活動(dòng)指示器
Show new-output indicator.顯示新的輸出指示器
Flash tab bar when switching tabs in fullscreen.全屏切換選項(xiàng)卡時(shí)閃爍選項(xiàng)卡欄
Show tab bar in fullscreen.全屏顯示選項(xiàng)卡欄
Stretch tabs to fill bar.拉伸選項(xiàng)卡以填充欄
Support basic html tags in tab title.在選項(xiàng)卡標(biāo)題中支持基本的 html 標(biāo)簽
Panes
Show per-pane title bar with split panes.使用拆分窗格顯示每個(gè)窗格標(biāo)題欄
Separate status bars per pane.每個(gè)窗格都有單獨(dú)的狀態(tài)欄
Separate background images per pane.每個(gè)窗格分別顯示背景圖像
Side margins.邊距
Top & bottom margins.上下頁(yè)邊距
Dimming 調(diào)光
Dimming amount.調(diào)光量
Dim inactive split panes.將不活躍的拆分窗格調(diào)暗淡
Dim background windows.將窗口背景調(diào)暗淡
Dimming affects only text,not background.調(diào)暗只影響文本,而不影響背景
Profiles 配置文件
配置文件和窗口是一對(duì)一的關(guān)系,配置文件控制自己的窗口,窗口的布局、大小、樣式、快捷鍵、光標(biāo)形式
General
自定義終端界面的標(biāo)志
Badge.印記、標(biāo)志
自定義標(biāo)簽頁(yè)標(biāo)題
Shortcut Key
Command
Login Shell
打開(kāi)終端界面的效果如下:
Command
選擇 Command 其實(shí)和選擇 Login Shell 沒(méi)有區(qū)別,只是開(kāi)啟新終端界面時(shí),少了一些信息輸出而已,如下所示:
選擇 Command 后打開(kāi)新終端界面,就會(huì)出現(xiàn)上圖所示的一行信息。
Custom Shell 配置 Shell 類(lèi)型
Working Directory 設(shè)置工作目錄
Colors
Foreground.前景色
Background.背景色
Selection.選中顏色
Selected text.選中文本的顏色
Badge.印記、徽章顏色
Bold.粗體文本的顏色
Tab Color.標(biāo)簽欄顏色
Brighten bold text.使粗體文本變亮
Minimum contrast.最小對(duì)比度
Underline color.下劃線顏色
Cursor Colors.光標(biāo)顏色
Cursor guide.光標(biāo)指示條背景色
自定義配色方案
網(wǎng)上有現(xiàn)成的配色方案,下載地址:https://iterm2colorschemes.com/。
1.下載壓縮包
2.解壓縮
3.打開(kāi) iTerm2 的 Preferences,接著在 Profiles → Colors → Color Presets,找到 import,點(diǎn)擊這個(gè)導(dǎo)入菜單項(xiàng),選擇解壓好的主題目錄下 schemes 目錄
Text 文本
Cursor 樣式
Underline 下劃線
Vertical bar 豎桿,推薦該樣式
Box 長(zhǎng)方體
Blinking cursor.閃爍光標(biāo)。打勾后光標(biāo)會(huì)閃爍,建議打勾
Text Rendering.文本渲染
Draw bold text in bold font.以粗體字體繪制粗體文本
Use thin strokes for anti-aliased text.消除鋸齒文本使用細(xì)筆劃
Ambiguous characters are double-width.不明確的字符是雙倍寬度
Anti-aliased.消除鋸齒
Window
Transparency.透明度
Opaque.不透明
Transparent.透明的
Blur.模糊度
Small Radius.小半徑
Background Image.背景圖
mode.模式
stretch.拉長(zhǎng)
tile.平鋪
scale to fill.等比例鋪滿
scale to fit.縮放以適合屏幕大小
blending.混合
Force this profile to always open in a new window,never in a tab.強(qiáng)制此配置文件始終在新窗口中打開(kāi),而不是在選項(xiàng)卡中打開(kāi)。如果勾選這個(gè)選項(xiàng),每次打開(kāi)新的命令行窗口時(shí)都會(huì)以新窗口打開(kāi),而不會(huì)以選項(xiàng)欄的方式打開(kāi)
Settings for New Windows 新窗口的設(shè)置
Style 風(fēng)格
Full-Width Bottom of Screen.屏幕底部全寬,讓終端界面顯示在屏幕底部,并占滿整個(gè)寬度
Full-Width Top of Screen.屏幕頂部全寬,讓終端界面顯示在屏幕頂部,并占滿整個(gè)寬度
Full-Height Left of Screen.屏幕左側(cè)全高
Full-Height Right of Screen.屏幕右側(cè)全高
Screen 屏幕
Screen width Cursor:用來(lái)判定哪個(gè)屏幕屬于當(dāng)前的工作空間,表示你的鼠標(biāo)在哪,哪里就是當(dāng)前的工作空間。
Space 空間
Current Spce:表示只顯示在當(dāng)前的工作空間,舉個(gè)例子吧,假設(shè)你在當(dāng)前屏幕打開(kāi)了終端,你切換到下一個(gè)屏幕時(shí)它就不會(huì)跟到下一個(gè)屏幕。
Terminal
scrollback buffer.回滾緩沖區(qū)
scrollback lines.回滾緩沖區(qū)的回滾行數(shù)
unlimited scrollback.不限制回滾的行數(shù),無(wú)限制地回滾
save lines to scrollback when an app status bar is present.當(dāng)存在應(yīng)用程序狀態(tài)欄時(shí),保存要回滾的行
save lines to scrollback in alternate screen mode.在交替屏幕模式下保存要回滾的行
terminal emulation.終端仿真、仿真終端、終端模擬器
report terminal type.報(bào)告終端類(lèi)型,通常選擇 xterm-256color
Enable mouse reporting.啟用鼠標(biāo)報(bào)告
Report mouse wheel events.報(bào)告鼠標(biāo)滾輪事件
Disable session-initiated printing.禁用會(huì)話啟動(dòng)的打印
Disable save / restore alternate screen.禁用保存/還原備用屏幕
Disable session-initiated window resizing.禁用會(huì)話啟動(dòng)的窗口大小調(diào)整
Notification Center Alerts.通知中心警報(bào)
Shell Integration.Shell 集成
Shell集成由腳本組成,這些腳本幫助Shell與iterm2通信,以便它可以跟蹤您正在運(yùn)行的命令、當(dāng)前目錄和其他狀態(tài)。了解更多
iTerm2 Utilities.iTerm2 實(shí)用工具
實(shí)用工具包括用于下載文件、內(nèi)聯(lián)顯示圖像等的腳本。了解更多
Internet-free Install. 互聯(lián)網(wǎng)免費(fèi)安裝
Guided manual installation . No download required.指導(dǎo)手動(dòng)安裝。無(wú)需下載
Download and Run Installer.下載并運(yùn)行安裝程序
Downloads the latest version . Runs curl l bash.下載最新版本,運(yùn)行命令 curl | bash
我點(diǎn)擊按鈕「Download and Run Installer」:
接著點(diǎn)擊「Continue」:
For best results , install shell integration on all hosts you ssh in to.為了獲得最佳效果,請(qǐng)?jiān)谀ㄟ^(guò)ssh連接到的所有主機(jī)上安裝shell集成
Insert newline before start of command prompt if needed.如果需要,請(qǐng)?jiān)诿钐崾痉_(kāi)始之前插入換行符
Show mark indicators.顯示標(biāo)記指示器
Session 會(huì)話
Undo can revive a session that has been closed for up to 5 seconds.撤銷(xiāo)可以恢復(fù)關(guān)閉時(shí)間不超過(guò)5秒的會(huì)話
Automatically log session input to files in path.將會(huì)話輸入記錄到 xxx 文件中
Avoid repainting while cursor is hidden to reduce flicker while scrolling.避免在光標(biāo)隱藏時(shí)重新繪制,以減少滾動(dòng)時(shí)的閃爍
Status bar enabled.啟用狀態(tài)欄
可以配置狀態(tài)欄:
Keys
Hotkey Window 設(shè)置熱鍵
a hotkey opens a dedicated window with this profile.打開(kāi)帶有此配置文件的專用窗口的熱鍵設(shè)置
when you press the hotkey bound to this profile a dedicated window will show or hide.each profile with a hotkey controls its own hotkey window.當(dāng)您按下綁定到此配置文件的熱鍵時(shí),將顯示或隱藏一個(gè)專用的窗口。每個(gè)具有熱鍵的配置文件都控制其自己的熱鍵窗口。
Pin hotkey window(stays open on loss of keyboard focus).固定住熱鍵窗口(失去鍵盤(pán)焦點(diǎn)時(shí)依舊打開(kāi)),建議打勾,否則光標(biāo)點(diǎn)擊其它地方終端界面就消失了,體驗(yàn)不好!終端窗口的出現(xiàn)和消失可以使用熱鍵來(lái)控制
Automatically reopen on app reactivation.應(yīng)用程序重新激活時(shí)自動(dòng)重新打開(kāi)
Animate showing and hiding.以動(dòng)畫(huà)形式顯示和隱藏
Floating window.浮動(dòng)窗口
floating windows overlap other windows and the dock,and other apps’Full Screen windows(if the hotkey Window’s Space is set to All Spaces).浮動(dòng)窗口與其他窗口和dock以及其他應(yīng)用程序的全屏窗口重疊(如果熱鍵窗口的空間設(shè)置為所有空間)
On dock icon click.在dock圖標(biāo)上單擊
Don’t do anything special.不做任何特別的事情
Show this hotkey window.顯示此熱鍵窗口
Show this hotkey window if no other window is open.如果沒(méi)有其它窗口打開(kāi),則顯示此熱鍵窗口
Advanced 高級(jí)
Triggers watch for text matching a regular expression to arrive in a terminal session and then perform an action in response.觸發(fā)器監(jiān)視與正則表達(dá)式匹配的文本到達(dá)終端會(huì)話,然后執(zhí)行響應(yīng)操作
Keys 鍵映射
Cycle Tabs Forward.向前(即向右邊)循環(huán)標(biāo)簽 Control + Tab
Cycle Tabs Backward.向后(即向左邊)循環(huán)標(biāo)簽 Shift + Control + Tab
Scroll One Line Up.向上滾動(dòng)一行,向前滾動(dòng)一行 Command + ↑
Scroll One Line Down.向下滾動(dòng)一行,向后滾動(dòng)一行 Command + ↓
touch bar mitigations.觸摸欄環(huán)節(jié)措施
haptic feedback when pressing esc.按 esc 鍵時(shí)的觸覺(jué)反饋
Key click for esc key.關(guān)鍵點(diǎn)單擊以獲取 esc 關(guān)鍵點(diǎn)
Visual esc key indicator.可視化的 esc 關(guān)鍵點(diǎn)指示器
Navigation Shortcuts
Remap Modifiers 重新映射修改器
注:這個(gè)不需要隨便改動(dòng),基本不會(huì)有人去修改這個(gè)東西的。
Pointer 指針 指示器
? - Click opens filename / URL ( semantic history ).按住 ? 時(shí)單擊文件名或者 URL 打開(kāi)文件或者網(wǎng)址(根據(jù)語(yǔ)義歷史記錄判斷)
? - Click moves cursor.單擊移動(dòng)光標(biāo)
Three-finger tap emulates middle click.三指輕觸模擬中擊
Three-finger Swipe Down.三指向下滑動(dòng)
總結(jié)
以上是生活随笔為你收集整理的iTerm2 for MacOS(终端模拟器/终端仿真器/命令终端工具)设置详解的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 安卓p桌面(安卓p壁纸)
- 下一篇: MacOS/MacBook设置短语快捷键