高亮显示代码块
代码块高亮可以直观地分隔代码中属于一起的部分。例如,当您将光标放在一组大括号内时,大括号内的代码就会高亮显示。
要启用代码块高亮,请访问首选项>Text Editor >Display ,然后选择Highlight blocks 。
折叠代码块
选择折叠标记可以折叠和展开括号内的代码块。在上图中,折叠标记位于行号和文本窗格之间。
要显示折叠标记,请进入首选项>Text Editor >Display ,然后选择Display folding markers 。该选项默认为启用。
折叠所有注释块
要折叠所有注释块,请访问Tools >C++ >Fold All Comment Blocks 。
要展开所有评论块,请选择Unfold All Comment Blocks 。
匹配括号动画
当光标位于括号上时,匹配的括号默认为动画。
要关闭动画并只高亮显示代码块和括号,请转到首选项>Text Editor >Display 并清除Animate matching parentheses 。
在代码块之间移动
使用键盘快捷键在代码块内和代码块之间移动:
- 要转到代码块末尾,请选择Ctrl+]。
- 要转到代码块起始位置,请选择Ctrl+[。
要选择从光标位置到代码块结束或开始的行,请分别选择Ctrl+Shift+ ]和Ctrl + Shift+[。
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.