pandemonium_engine_docs/usage/editor/external_editor.md

61 lines
3.1 KiB
Markdown
Raw Normal View History

2023-01-12 20:49:14 +01:00
Using an external text editor
==============================
This page explains how to code using an external text editor.
2024-03-16 20:56:52 +01:00
Pandemonium can be used with an external text editor, such as Sublime Text or Visual
2023-01-12 19:43:03 +01:00
Studio Code. Browse to the relevant editor settings: `Editor -> Editor Settings
-> Text Editor -> External`
2023-01-12 20:16:00 +01:00
![](img/editor_settings.png)
There are two fields: the executable path and command-line flags. The flags
2024-03-16 20:56:52 +01:00
allow you to integrate the editor with Pandemonium, passing it the file path to open
and other relevant arguments. Pandemonium will replace the following placeholders in
the flags string:
+---------------------+-----------------------------------------------------+
| Field in Exec Flags | Is replaced with |
+=====================+=====================================================+
2023-01-12 19:43:03 +01:00
| `{project}` | The absolute path to the project directory |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| `{file}` | The absolute path to the file |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| `{col}` | The column number of the error |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| `{line}` | The line number of the error |
+---------------------+-----------------------------------------------------+
Some example Exec Flags for various editors include:
+---------------------+-----------------------------------------------------+
| Editor | Exec Flags |
+=====================+=====================================================+
2023-01-12 19:43:03 +01:00
| Geany/Kate | `{file} --line {line} --column {col}` |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| Atom/Sublime Text | `{file}:{line}` |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| JetBrains Rider | `{project} --line {line} {file}` |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| Visual Studio Code | `{project} --goto {file}:{line}:{col}` |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| Vim (gVim) | `"+call cursor({line}, {col})" {file}` |
+---------------------+-----------------------------------------------------+
2023-01-12 19:43:03 +01:00
| Emacs | `emacs +{line}:{col} {file}` |
+---------------------+-----------------------------------------------------+
2023-01-12 20:55:57 +01:00
Note:
For Visual Studio Code, you will have to point to the `code.cmd`
2023-01-12 19:43:03 +01:00
file. For Emacs, you can call `emacsclient` instead of `emacs` if
you use the server mode.
Official editor plugins
-----------------------
We have official plugins for the following code editors:
2024-03-16 20:56:52 +01:00
- `Visual Studio Code ( https://github.com/pandemoniumengine/pandemonium-vscode-plugin )`
- `Emacs ( https://github.com/pandemoniumengine/emacs-gdscript-mode )`