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