DEV Community

Vu
Vu

Posted on

Moving from Vim to Helix

This is my article about Helix - a post-modern editor.

Reference:

Built-in with Rust.

Yes, Helix is an open source written by Rust, no Electron, no Javascript. You can use it tmux, plain any terminal. My combo iTerm2 + tmux - very good :), save for battery life and still have a good performance.

The Begin.

If you use vim or neovim, you will have a little surprise with Helix. Helix follows the selection -> action model. This means that whatever you are going to act on: a word, a line, etc is selected first and after action on it (delete, yank, change, etc).

You still move with j, k, l, h as Vim. But when use w, b or e, you will see a cursor select your word.

Image description

Some cheatsheet:

Action Helix Vim
Delete a word wd dw
Delete a character d x
Select a line x Shift + v
Go to the first file gg gg
Go to end file ge Shift + g
Go to end line gl $
Go to first line gh 0

And you can use shell command in helix:

Image description

More information: use tutor

Image description

Easy to config

If vim uses .vimrc to config for vim, helix uses config.toml to configure editor. This is official documents
It is easy to config, I show my current config.

theme = "gruvbox"

[editor]
line-number = "relative"
mouse = true

[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"

[editor.whitespace.render]
space = "none"
tab = "all"
newline = "none"

[editor.whitespace.characters]
space = "·"
tab = "╎"

Enter fullscreen mode Exit fullscreen mode

Props and Cons

  1. Props:

    • Config with file
    • LSP integration
    • Fuzzy file in the project
    • Debugging (experimental)
  2. Cons:

    • Not File explorer.
    • Some LSP need a manual config (JSX, TSX).
    • Not support plugin.
    • Status-bar is simple.
    • A lot of issues are pending.

Anyway, helix is developing, and we can hope many contributor help to improve.

Top comments (2)

Collapse
 
lyaricci profile image
Nathálya Ricci

I tried Helix, but couldn't find a way to config Eslint and Prettier to work with my .eslintrc and .prettierrc... It just works with its own config :(

Collapse
 
manchicken profile image
Mike Stemle

What's funny is that I just started using Helix myself, and I can't find a single comprehensive table of VIM mappings to Helix ones. Have you found anything like this?