A set of unholy Vim keybindings to make it behave like Helix. Useful for IDEs with a Vim emulator but no Helix emulator.
Download or clone the Vim files from this repository. Cloning is probably easier for keeping up-to-date.
git clone https://github.com/chtenb/helix.vim ~/helix.vim/
Then source the relevant .vim
files in your .vimrc
.
source ~/helix.vim/helix.vim
Make sure VsVim is installed. Then
source ~/helix.vim/helix.vs.vim
When PeasyMotion is installed, gw
will behave similarly as in helix.
source ~/helix.vim/helix.idea.vim
- KJump for
gw
- String manipulation for
&
- Tab Shifter for directional window navigation
Your best bet is to source helix.vim
, but you will probably run into emulator-specific bugs or quirks.
If you manage to develop a working set of mappings for an IDE that is not included here yet, feel free to open a pull request for it.
Also have a look at apocryphal.vim
and apocryphal.vs.vim
for mappings that are not canonical for Helix, but you may find useful nonetheless.
Vim has no builtin LSP, Treesitter or multiple selection support, so the generic mapping set lacks bindings that rely on these features. Depending on the IDE some functionality can be emulated in IDE-specific mappings. See src/helix.vs.vim for examples.
The documentation consists of the scripts themselves, in src/
,
most notably src/helix.vim and src/helix.vs.vim.
The source files are in src/
and are compiled into top-level scripts with the compile.sh
script.
For convenient development it is recommended that you source the files directly from src/
and add the following mapping for reloading the keymap.
noremap <F4> <Esc><Esc>:mapclear<CR>:source ~/.vimrc<CR>:echo "reloaded!"<CR>
Pull requests for fixes and additional emulator support are welcome.