The Markdown tables in the configuration/key-bindings.md
are generated via a script, script/key-bindings/main.py
. In order to run this script, you'll need to install Python and complete the following setup instructions:
- Change directories to the key bindings script directory:
cd script/key-bindings
- Create a virtual environment:
<path to python interpreter> -m venv <path to virtual_environment_directory>
- Install the requirements:
pip install -r requirements.txt
- Activate the environment:
source virtual_environment/bin/activate
The script works by:
- Taking in Zed's default key bindings file (
script/key-bindings/source/default.json
) - Creating Markdown tables based on the key bindings file
- Injecting those Markdown tables into a template file (
script/key-bindings/source/key-bindings-template.md
) - Writing the final product to the document file (
configuration/key-bindings.md
)
Note: Don't modify configuration/key-bindings.md
directly - only files within the script/key-bindings/source/
directory should be modified. In the .gitignore
, you'll notice that we have the following entry: script/key-bindings/source/default.json
. It is expected that you make this file and populate it by:
- Running the
zed: open default keymap
command in Zed - Copying and pasting the contents into
script/key-bindings/source/default.json
(use Zed stable for this step)
Once the updates are in place, run the script via python main.py
and ensure that the output looks correct.