FakeVim

To set prerences for Vim-style editing, go to Preferences > FakeVim.

Setting Vim Behavior

To set Vim behavior, go to Preferences > FakeVim > General.

{FakeVim General preferences}

To use presets:

  • To preselect the indentation settings specified for the text editor, select Copy Text Editor Settings.
  • To preselect the Qt coding style, select Set Qt Style.
  • To preselect a simple indentation style, select Set Plain Style.

Then change the preselected settings.

Emulating Plugins

Select popular vim plugins to emulate in Plugin Emulation.

The following table describes the available plugins with links to them.

Vim PluginDescription
vim-commentarygc action to comment code regions. For example, gcc, gc2j, gcip
ReplaceWithRegister
  • [count]["x]gr{motion} to replace motion with the contents of register x.
  • ["x]grr to replace the current line.
argtextobj.vimDefines the ia and aa text objects for function parameters.
vim-exchangeA text exchange operator for vim.
vim-surroundAdds mappings for deleting, adding, and changing surroundings.

Mapping FakeVim Commands

To map commands entered on the FakeVim command line to Qt Creator functions:

  1. Go to Preferences > FakeVim > Ex Command Mapping.
  2. Enter a string in the Filter field to find a Qt Creator function.

    {FakeVim Ex Command Mapping preferences}

  3. Select a function in the list
  4. In the Regular expression field, nter a string that will trigger the function.

    You can see the trigger expression in the Ex Trigger Expression field.

To remove the selected trigger expression, select Reset.

To reset the trigger expressions for all functions, select Reset All.

Mapping User Commands

To map user commands to keyboard shortcuts, go to Preferences > FakeVim > User Command Mapping. The user command mapped to the shortcut is executed by FakeVim as if you were typing it (as when replaying a macro).

{FakeVim User Command Mapping preferences}

See also Edit like in Vim and FakeVim Modes and Commands.

© 2024 The Qt Company Ltd. 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.