Chapter 10 · Editing and files编辑与文件編輯與檔案
Bookmarks and navigation书签与导航書籤與導航
Line bookmarks
A bookmark marks a single line in one document. It is not a cross-file bookmark store, and it does not annotate content.
| Action | Default shortcut |
|---|---|
| Toggle bookmark on current line | Assign in the shortcut editor |
| Next bookmark | ⌘⇧N |
| Previous bookmark | ⌘⇧P |
| Copy marked line | From the bookmark menu |
The toggle command may ship without a default binding because the obvious chord is already used by the file-browser toggle. Set a binding in the shortcut editor if you use bookmarks heavily.
Bookmark panel
The panel lists every bookmark in the current document in line order. Selecting an entry jumps to it. The panel is per document and updates as lines are added or removed.
Behaviour under editing
- Inserting lines above a bookmark shifts it down with the content.
- Deleting a bookmarked line removes the bookmark.
- Bookmarks belong to the document in memory; closing the document without saving discards new bookmarks.
Persistence
Bookmarks are part of the session, so they are restored with the document when the app reopens. They are not written into the file itself.
Navigation alternatives
For one-off jumps, Go to line (⌘L) is faster than a bookmark. Use bookmarks for places you will return to repeatedly in a long investigation.
行级书签
书签标记单个文档中的某一行。它不是跨文件书签库,也不会向内容写入任何注记。
| 操作 | 默认快捷键 |
|---|---|
| 切换当前行书签 | 在快捷键编辑器中自行指定 |
| 下一个书签 | ⌘⇧N |
| 上一个书签 | ⌘⇧P |
| 复制标记行 | 书签菜单 |
切换命令可能没有默认绑定,因为最直观的组合已被文件浏览器占用;常用书签的话建议在快捷键编辑器里自行设置。
书签面板
面板按行序列出当前文档的全部书签,点击即跳转。面板属于单个文档,会随行的增删更新。
编辑时的行为
- 在书签上方插入行,书签随内容下移。
- 删除被标记的行,书签一并移除。
- 书签属于内存中的文档;不保存就关闭文档,新加的书签会丢弃。
持久化
书签属于会话的一部分,应用重新打开时会随文档恢复。它们不会被写进文件本身。
其他导航方式
一次性跳转用「跳转行」(⌘L)更快;书签适合在长时间排查中反复回到的位置。
行級書籤
書籤標記單個文件中的某一行。它不是跨檔案書籤庫,也不會向內容寫入任何注記。
| 操作 | 預設快速鍵 |
|---|---|
| 切換當前行書籤 | 在快速鍵編輯器中自行指定 |
| 下一個書籤 | ⌘⇧N |
| 上一個書籤 | ⌘⇧P |
| 複製標記行 | 書籤選單 |
切換命令可能沒有預設綁定,因為最直觀的組合已被檔案瀏覽器佔用;常用書籤的話建議在快速鍵編輯器里自行設定。
書籤面板
面板按行序列出當前文件的全部書籤,點擊即跳轉。面板屬於單個文件,會隨行的增刪更新。
編輯時的行為
- 在書籤上方插入行,書籤隨內容下移。
- 刪除被標記的行,書籤一並移除。
- 書籤屬於記憶體中的文件;不儲存就關閉文件,新加的書籤會丟棄。
持久化
書籤屬於工作階段的一部分,應用重新開啟時會隨文件恢復。它們不會被寫進檔案本身。
其他導航方式
一次性跳轉用「跳轉行」(⌘L)更快;書籤適合在長時間排查中反復回到的位置。