The editor pane in the python console has a button "Open in External Editor".

How do I tell QGIS what program to use as the external editor?

1 Answer 1


QGIS uses editor set in the operating system. If you use Linux, you can set the VISUAL and EDITOR environment variables, for example to use vim as an external editor:

export VISUAL=vim

If you would like to set it permanent add these two lines above to the .bashrc file in your home directory. Replace vim with your favorite text editor (e.g. nano, pico, gedit, etc.).

On Windows you can set default application depending on the file extension. Here is an example: https://www.howto-connect.com/make-notepad-as-default-text-editor-windows-10/

  • 3
    This works on Windows as well. Create a system environment variable called EDITOR and set it to something like emacsclient (or vim). Oct 20, 2021 at 22:09
  • 3
    Or let QGis create that variable on startup via Settings > Options > System > Environment
    – ludwig
    May 8, 2022 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.