A Helix patch that adds Vim emulation in Helix. Ideal for users who prefer Vim motions but want to benefit from Helix’s editing capabilities like multi-cursor support and tree-sitter awareness.
To get the latest, build this project from source—just like Helix itself. 👉 Follow the official Helix build guide
Download pre-built binaries from the GitHub Releases page. Then, follow the official Helix guide for setup steps.
Vim mode is enabled by default. Use :vim-disable
and :vim-enable
to disable and enable Vim emulation.
- Visual mode and Visual lines:
v
,V
va)
,vi<textobject>
(<textobject>
:w
,W
,p
...etc)- Treesitter-related selection such as
vaf
to select a function. gv
- Visual Block:
C-v
works similarly to Vim’s visual block mode, but it’s not exactly the same — It simply creates multiple cursors.
d
,dd
,c
,cc
,y
,yy
[c|y|d]<motion>
likedw
,dB
[c|y|d]{textobject}
likediw
,da)
,yi}
- Treesitter-related modification keybindings such as
daf
to delete a function oryaf
to yank a function.
*
,#
,n
,N
0
,^
,$
f<char>
,F<char>
,t<char>
,T<char>
{
,}
w
,W
,b
,B
,e
,E
gg
,G
C-^
,C-6
If you have sed
on your System, you can use :s/../../flags
like Vim or :s|..|..|flags
. You don't need to add %
, it will default to :%s
in normal mode and will be applied to the selection in visual
mode.
However, we advice using Helix multicursor to achive this:
-
Select target text
- For the whole file:
ggVG
- You can also remap
select_all
/vim_select_all
to directly select all text.
- For the whole file:
-
Create multicursors:
- Press
s
, then type your regex (e.g.,foo
) and hit<Enter>
. This will put a cursor on allfoo
in the buffer.
- Press
-
Replace using multi-cursor:
- Use Vim-style editing. For example, press
c
to change selection, then type your replacement text.
- Use Vim-style editing. For example, press
-
Exit multi-cursor mode:
- Press
,
(comma)
- Press
<Space>e
Open file explorer in workspace root<Space>E
Open file explorer at current buffer's directory<Space>f
Open file picker<Space>F
Open file picker at current working directory
- Helix follows selection → action model. This patch simply removes the
selection
part for almost all commands in Normal mode. However, if you need the original Helix behavior of any command, you can wrap it withvim_cmd_off
andvim_cmd_on
in your config file:
[keys.normal]
"A-up" = ["vim_cmd_off", "expand_selection", "vim_cmd_on"]
-
Helix's
select_all
(%
) is mapped tomatch_brackets
, similar to Vim.select_all
creates a selection in Normal mode. If you need the command in Vim mode, apply the previous trick or map it tovim_select_all
. -
s
is used by Helix forselect_regex
and it's an important command for multi-cursor support. Either usec
instead ofs
or remap keys. -
C
is used by Helix forcopy_selection_on_next_line
and it's an important command for multi-cursor support. To get Vim behaviour, map it tovim_change_till_line_end
. -
To get Helix's
escape
behavior instead of Vim's, you can remap it to thevim_normal_mode
command:
[keys.insert]
"esc" = "vim_normal_mode"
These differences might be reduced in the future.