This project provides a Ruby script to transform the JSON configuration file for the Zed editor's keybindings to be Colemak keyboard layout-friendly. It reads the existing keybindings, applies specified key swaps, and outputs the modified keybindings.
The following key swaps are applied:
j
->n
k
->e
l
->i
n
->k
i
->u
u
->l
e
->f
f
->t
t
->j
These swaps are applied even when used with shift-
or ctrl-
prefixes.
The keymap input file is the vim.json
file found at:
https://github.com/zed-industries/zed/blob/main/assets/keymaps/vim.json
The key swaps are inspired by the excellent wbolster/emacs-evil-colemak-basics.
- Ruby (version 2.0 or higher)
- A JSON configuration file for the Zed editor's keybindings (
vim.json
)
-
Clone the repository:
git clone https://github.com/yourusername/colemak-friendly-keybindings.git cd colemak-friendly-keybindings
-
Ensure you have Ruby installed:
ruby -v
If you don't have Ruby installed, you can download it from ruby-lang.org.
- Place your vim.json file in the project directory:
Ensure your vim.json file is in the same directory as the script.
- Run the script:
ruby colemak_keybindings.rb
- Output:
The script will generate a new file named colemak_keybindings.json in the same directory with the modified keybindings.
Feel free to contribute to this project by opening issues or submitting pull requests. Any improvements or bug fixes are welcome.
This project is licensed under the MIT License.