Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
This plugin provides quick switching between recently opened scripts using a currently hardcoded keyboard shortcut: Ctrl + Tab. This is a recreation of VSCode's Quick Open for MRU (Most Recently Used) files, improving workflow efficiency for developers who are familiar with this ...workflow.
Godot Script Switcher
Quick switching of open scripts in the ScriptEditor with Ctrl + Tab.
This is a plugin for the Godot Game Engine created with godot-cpp that provides quick switching between recently opened scripts using a currently hardcoded keyboard shortcut: Ctrl + Tab. This is a recreation of VSCode's Quick Open for MRU (Most Recently Used) files, improving workflow efficiency for developers who are familiar with this ... workflow. Mainly just a pain point for me working in Godot - so here we are.
Table of Contents
Features
- Most Recently Used (MRU) Script History: Keeps a list of the scripts you have open.
- Quick Switch Popup: A compact popup window with recent scripts by their file names.
- Keyboard-driven Navigation: Navigate and select scripts within the popup using familiar keyboard shortcuts.
- Contextual Activation: The popup only appears when the Script Editor is the active tab, as that makes sense for a script switcher.
- Full Path Tooltips: Each script in the list displays its full path as a tooltip.
Todo
- Add support for Godot Docs in the history.
- Capture holding keys, not just presses.
Usage
Once the plugin is enabled, you can use the following keyboard shortcuts:
Trigger the popup:
- Press
Ctrl + Taband holdCtrl. - A popup will appear, displaying a list of your open scripts, sorted by how recently they were used.
- Note: the second item in the list (the previously active script) will be selected, allowing for quick toggling between your two most recent scripts.
- Press
Navigate the List:
- While still holding
Ctrl, pressTab,Down Arrow, orUp Arrowto select a script.
- While still holding
Select a script:
- Release the
Ctrlkey. - The script currently highlighted in the popup will be opened in the Script Editor.
- Release the
Installation
Godot Asset Library (recommended)
Note: Not uploaded as of yet.
- Open Godot β AssetLib tab
- Search "Godot Script Switcher" β Download
- In the install dialog, make sure "Ignore asset root" is checked, then click Install
- Project β Project Settings β Plugins β Enable Godot Script Switcher
- Restart the Editor
Releases (easy)
Head to releases and download whatever version you want. I'll probably have files for Windows/Linux/Mac available there.
- Download a release zip.
- Extract to your project's addons dir:
../addons/godot-script-switcher. - Enable the plugin:
- Project β Project Settings β Plugins
- Click to enable Godot Script Switcher
Manual (fun)
You'll have to compile it on your target platform and then enable it in your Godot project. This project requries CMake, GCC, and Ninja is recommended.
Clone the Repository.
cd godot-scipt-switcher/ git clone https://github.com/travlee/godot-script-switcher.git .Compiling: This plugin is written in C++ using
godot-cpp. You must compile the plugin for your specific OS and architecture using CMake. I use Ninja as the build system, if you use Visual Studio, the output dir will differ so you'll have to combine them into theaddons/godot_script_switcher/dir.- From the root of the project, configure the CMake build:
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release - Build the plugin:
cmake --build build --config Release - After building, simply copy the
./godot/addons/godot_script_switcher/dir to your project's./addons/dir.
- From the root of the project, configure the CMake build:
Enable the Plugin in Godot:
- Project β Project Settings β Plugins
- Click to enable Godot Script Switcher
Technical Details
This plugin is implemented in C++, using Godot's GDExtension with godot-cpp bindings for blazingly fast performance and deep integration with the Godot editor. Also I wanted to.
The ScriptSwitcher class tracks script changes by binding to the ScriptEditor::editor_script_changed signal, updating an MRU history variable stored as a vector type. It overrides the global _inputs method to listen for Ctrl + Tab combinations and only displays the quick-open popup if the script editor is active. The popup UI is designed in Godot and saved to a .tscn file and dynamically loaded in when the plugin is enabled.
Contributing
If you encounter any bugs, have suggestions for new features, or would like to improve the existing code, please feel free to:
- Open an Issue: Describe the bug or feature request in detail on the GitHub issue tracker.
- Submit a Pull Request: Fork the repo, make some changes, and submit a PR.
License
This plugin provides quick switching between recently opened scripts using a currently hardcoded keyboard shortcut: Ctrl + Tab. This is a recreation of VSCode's Quick Open for MRU (Most Recently Used) files, improving workflow efficiency for developers who are familiar with this ...workflow.
Reviews
Quick Information
This plugin provides quick switching between recently opened scripts using a currently hardcoded keyboard shortcut: Ctrl + Tab. This is a recreation of VSCode's Quick Open for MRU (Most Recently Used) files, improving workflow efficiency for developers who are familiar with this ...workflow.