Home › QGIS 4 readiness › Built into QGIS › Better Editor
Better Editor Built into QGIS 3.32 as Python Console editor tools
QGIS 3.32 and later do the main job of Better Editor natively, with Python Console editor tools. You can use that instead of installing the plugin. The Python Console editor gained Toggle comment in QGIS 3.30 and Reformat code (black or autopep8) in 3.32, both from this plugin's author. Jedi autocompletion was not ported.
| Native feature | Python Console editor tools |
|---|---|
| First release | QGIS 3.32 |
| Where to find it | Python Console (Plugins › Python Console) › Show Editor › Toggle comment and Reformat code |
| Plugin | Better Editor, last released 2020-07-24 |
| Plugin on QGIS 4 | Not QGIS 4 ready |
How to use Python Console editor tools
- Open the Python Console with Plugins › Python Console (Ctrl+Alt+P) and click Show Editor.
- Select lines and press Ctrl+: (Toggle comment) to comment or uncomment them.
- Press Ctrl+Alt+F (Reformat code) to format the script.
- In the console's Options…, choose black or autopep8, the maximum line length, import sorting and format on save. Formatting can need extra Python modules.
Sources: QGIS 3.32 changelog entry QGIS User Manual
A native feature can differ from the plugin in details. If you rely on a specific option, read the linked entry before you uninstall.
QGIS plugin news, once a week
GIS Plugins Weekly: new plugins, useful updates and QGIS 4 readiness changes. Free, unsubscribe anytime. See a sample issue.