Page MenuHome

Text Editor: Add Indent-or-Autocomplete operator
ClosedPublic

Authored by Wilhem Barbier (wbrbr) on Nov 13 2019, 9:11 AM.

Details

Summary

Currently the Ctrl-Space keybinding is used for the autocompletion operator in the text editor, and to maximize area everywhere else. To fix this, a new operator indent_or_autocomplete is replacing the indent operator and has the following behavior:

  • if the character before the cursor is whitespace, the line is indented
  • if the character before the cursor is not whitespace, the current word is autocompleted

By default, this new operator is bound to the Tab key.
The default keybinding for the autocomplete operator is also removed (but the operator itself is not).

Related to T67213

(this is my first patch, please tell me if I did anything incorrectly)

Diff Detail

Repository
rB Blender

Event Timeline

Thanks, committed rBe98d27fd8d432650489f973abcdfad4163e87f42

Note, I added a selection check so selection always indents since it's common to select a block of text and indent it.

This revision is now accepted and ready to land.Fri, Nov 22, 10:54 AM