Project: QGIS

Version: 3.30

Feature: Smart bracket autocomplete updates for Code Editors

Previous releases of QGIS included an autoCloseBracket setting for the Python Console, which had a number of limitations in its behavior, including being limited to use within the Python Console and Script Editor interfaces.

Updates to the autocomplete settings extend this functionality to other Code Editor interfaces, such as the Expression Editor, Project Macro Editor, and Script Editor. The autoCloseBracket behavior has also been adjusted to better mimic the behavior of modern IDEs, and an autoSurround setting has been added to surround selected text when using the following character sets:

  • braces/ curly brackets: {}
  • square/ box brackets: []
  • parenthesis/ round brackets: ()
  • double quotation mark: "
  • single quotation mark: '
  • backticks: `
  • asterisk: *

With the exception of the backtick and asterisk characters, the autoCloseBracket functionality is available when encapsulating new data without an active text selection.

The autocompletion configuration is enabled by default for new releases, but a new settings interface is provided for granular control by users.

This feature was developed by Yoann Quenach de Quivillic