假 Vim
要设置 Vim 风格编辑的首选项,请转至首选项>FakeVim 。
设置 Vim 行为
要设置 Vim 行为,请转至首选项>FakeVim >General 。
使用预设
- 要预选为文本编辑器指定的缩进设置,请选择Copy Text Editor Settings 。
- 要预选 Qt XML 编码样式,请选择Set Qt Style 。
- 要预选简单的缩进样式,请选择Set Plain Style 。
然后更改预选设置。
模拟插件
在Plugin Emulation 中选择流行的 vim 插件进行模拟。
下表描述了可用的插件及其链接。
Vim 插件 | 说明 |
---|---|
vim-commentary | gc 对代码区域进行注释的操作。例如 , 、gcc gc2j gcip |
ReplaceWithRegister |
|
argtextobj.vim | 为函数参数定义ia 和aa 文本对象。 |
vim-exchange | vim 的文本交换操作符。 |
vim-surround | 添加用于删除、添加和更改周围环境的映射。 |
映射 FakeVim 命令
将FakeVim 命令行中输入的命令映射到Qt Creator 函数:
- 转至首选项>FakeVim >Ex Command Mapping 。
- 在Filter 字段中输入字符串,查找Qt Creator 函数。
- 在列表中选择一个函数
- 在Regular expression 字段中输入将触发函数的字符串。
您可以在Ex Trigger Expression 字段中看到触发表达式。
要删除选定的触发表达式,请选择Reset 。
要重置所有函数的触发表达式,请选择Reset All 。
映射用户命令
要将用户命令映射到键盘快捷键,请转到首选项>FakeVim >User Command Mapping 。映射到快捷键的用户命令会被 FakeVim 执行,就像你在输入一样(就像重播宏一样)。
另请参阅 像在 Vim和FakeVim 模式和命令中一样编辑。
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.