本页面内容

为代码添加书签

要在“Edit ”模式下插入或删除书签:

  • 右键单击行号,然后选择“Toggle Bookmark ”。
  • 按住Shift键并单击某行的左边距。
  • 当光标位于某行上时,按Ctrl+M

切换书签

向书签添加注释

要向书签添加注释:

  • 转到“Tools ” > “Bookmarks ” > “Edit Bookmark ”。
  • Ctrl+Shift+M
  • 右键单击书签,并在上下文菜单中选择“Edit Bookmark ”。

要查看备注,请将鼠标指针悬停在书签上,或打开侧边栏中的“Bookmarks ”视图。

要跳转到当前会话中的上一个书签,请转到“Tools ” > “Bookmarks ” > “Previous Bookmark ”,或按Ctrl+,

要跳转到当前会话中的下一个书签,请转到“Tools ” > “Bookmarks ” > “Next Bookmark ”,或按Ctrl+..

查找书签

要使用定位器跳转到书签,请按Ctrl+K(或 macOS 上的Cmd+K)打开定位器。 输入b并按空格键,即可显示书签列表。若要按行号或文本字符串筛选书签,请在空格后输入相应的数字或字符串。双击列表中的书签,即可在编辑器中跳转至该书签。

在定位器中筛选书签

查看书签

侧边栏中的“Bookmarks ”视图会列出书签。要在书签之间切换,请点击“Previous Bookmark ”或“Next Bookmark ”按钮,或使用键盘快捷键。

在“书签”视图中列出书签

要上下移动书签,请在上下文菜单中选择“Move Up ”或“Move Down ”,或按Ctrl+Alt+,Ctrl+Alt+..

若要按设置书签的文件名称按字母顺序排列书签,请选择“Sort by Filenames ”。

另请参阅 《如何:编辑代码》和《编辑代码》。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.