• Stars
    star
    933
  • Rank 48,976 (Top 1.0 %)
  • Language
  • Created over 2 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Vim-like configuration for Helix

Helix-Vim

A Vim-like configuration for Helix

About

Let me guess why you're here. You're a (Neo)Vim user. Today, for the millionth time, you updated your plugins and were met with a sea of criminally useless error messages. You have things to do. You don't have time to search the GitHub issues of arcane plugins maintained by people whose approach to breaking changes is... well, a little too cavalier for your tastes.

You recall a friend or a colleague sent you a link to the Helix editor a while ago. It looked pretty cool, right?

"But what about the plugins!" cried the acolytes of NeoVim. Hmm... Plugins. Those plugins that break your barely recognizable vimrc with depressing regularity. Or maybe you really drank the Kool Aid and translated your config to Lua. It doesn't matter either way. Breaking changes in NeoVim plugins don't care about your .vimrc or your init.lua

Yes... Those plugins that you shouldn't even need to install to have a functional editor.

Plugins be damned!

Your sweaty hands fumble on your obnoxiously loud mechanical keyboard with the alt + hjkl keys to focus your open terminal emulator with your tiling window manager. kitty or alacritty, probably. You are thrown back briefly to a memory of the countless hours spent trying to get your terminal and Neo(Vim) colourschemes to match.

You install the latest binary release of Helix available on your package manager of choice and cd into the directory you were about to start working in before your Neo(Vim) configuration was drowned in a flood of red.

hx

You tentatively press the space bar and try out the file picker. Fuzzy search. Syntax highlighting. Nice. Naturally, the directory you are in hosts a Rust project. You select one of the numerous lib.rs files which serve as the entry points to the Cargo workspace crates that you split your monolith out into in hope of improving your incremental compilation times on your aging Macbook Pro. Your company won't give you one of the new M1 models because this one isn't 5 years old yet. Alas.

You hear rust-analyzer begin to impose its will on your aging Intel CPU, crippled further by Jonny Ive's obsession with thinness above everything. I bet he's a raging fatphobe.

Wait a minute... Your eyes dart around the screen. There are no errors. The syntax highlighting looks right. You try to navigate through the file using {}, but it's not working. Hmm, that can be figured out later. You use the mouse to bring the cursor to an invocation of a declarative macro_rules! macro. You press g and are met with a host of LSP-powered options. You didn't even install an LSP plugin! You press k and a pop-up appears with the documentation for the macro.

This is how life should always be. You resolve to make the switch to Helix.

... And not long after, you give up. Your Vim muscle-memory is too strong. The Verb-Modifier-Object structure of Vim commands has become the language that your brain uses to send instructions to your fingers. Defeated, the references to hx in your .zsh_history become fewer and far between, until they disappear completely, replaced once again by vim, nvim or nvim aliased to vim.

You dismiss the red error messages screaming at you every time you open the editor. Maybe you keep an instance of it running after you have dismissed all the errors so that you don't have to go through the humiliation of dismissing errors that you don't have the time, energy or motivation to fix every time you want to edit a file.

Maybe one day, you think, it will be possible to use Helix in "Vim mode", after all, there is even a pretty decent Vim plugin for VSCode these days, right?

My friend. I have felt your frustration, your anger, your sorrow, your disappointment, and your defeat.

I might not be able to give you a perfect solution right now, but I can give you more than enough to get the ball rolling!

Usage

Check out the config.toml file in this repository. It only contains key mappings. These were the most important key mappings to allow me to use as much of my Vim muscle-memory as possible when editing text in Helix.

If you are used to doing c commands a lot, you're going to have to adapt to selecting the area you want with v and then deleting it.

With this being said, a lot of the most basic stuff (including C, 0, $, ^, G, {} and %!) that you rely on every day to edit and navigate a text file without thinking about it, is implemented.

Feel free to fork this, personalize it, make suggestions, improvements, fill in gaps that I don't know how to fill, etc.

More Repositories

1

komorebi

A tiling window manager for Windows 🍉
Rust
9,253
star
2

whkd

A simple hotkey daemon for Windows
Rust
444
star
3

unsubscan

A tool to help you find unsubscribe links in your emails
Rust
255
star
4

nixos-wsl-starter

A sane, batteries-included starter template for running NixOS on WSL
Nix
204
star
5

yatta

A tiling window manager for Windows 10 based on binary space partitioning
Rust
147
star
6

komokana

Automatic application-aware keyboard layer switching for Windows
Rust
106
star
7

komorebi-application-specific-configuration

A central place to document all tweaks required for Komorebi to 'just work' with as many applications as possible
58
star
8

satounki

Temporary elevated access management as a self-hosted service
Rust
37
star
9

nixos-hetzner-cloud-starter

A sane, batteries-included starter template for running NixOS on Hetzner Cloud
Nix
28
star
10

elasdx

An ElasticSearch index template updating, reindexing and cleanup tool
Go
22
star
11

JeezyVim

A fast, reliable NeoVim configuration as a Nix Flake for people who want to use NeoVim as an editor and not as an IDE
Nix
20
star
12

microfest

Manifest management for single page applications driven by micro frontend apps
Go
15
star
13

story

Workflow tool for implementing stories across multiple inter-dependent node projects in a meta-repo
Go
15
star
14

nixos-hetzner-robot-starter

A sane, batteries-included starter template for running NixOS on Hetzner Robot
Nix
13
star
15

nixos-multi-machine-starter

A sane, batteries-included starter template for running NixOS on Multiple Machines
Nix
12
star
16

sbmt

Seedbox Mount Tool
Go
10
star
17

Nazm

Declarative configuration management for Windows
Rust
10
star
18

komorebi-custom-layout-generator

An interactive tool to generate komorebi custom layouts in JSON
Svelte
9
star
19

bfm

Brewfile Manager
Go
7
star
20

sgrab

Grab an episode file from a seedbox running Sonarr
Go
5
star
21

nix-home-manager-corp-starter

A sane, batteries-included starter template for using Nix to create reproducible cloud development machines in corporate environments
Nix
5
star
22

xeetshot

longer xeets without premium or threads
HTML
4
star
23

diesel-autoincrement-new-struct

Generate NewStructs for all your tables with autoincrementing IDs
Rust
3
star
24

notado-cli

A CLI for interacting with https://notado.app
Rust
3
star
25

tdee

Calculate your total daily energy expenditure
Go
2
star
26

call-me

A ci-agnostic orchestrator for triggering tests on a shared environment pool across multiple pipelines
Go
1
star
27

triforce

Assemble and link node dependencies across meta and monorepo projects
Go
1
star
28

tashkil

A lightweight Rust library for removing Arabic diacritics
Rust
1
star
29

gainit

Calculate an estimate of daily calorie consumption to meet a weekly weight gain goal
Go
1
star
30

komorebi-bucket

1
star
31

loseit

Calculate an estimate of daily calorie consumption to meet a weekly weight loss goal
Go
1
star
32

komorebic-bucket

1
star
33

nix-crane-matrix-repro

Nix
1
star
34

skaffold-beam

A blast radius-aware Skaffold manifest generator for node meta-repos
Go
1
star
35

LGUG2Z

1
star
36

blastradius

See the potential impact of changes in one project across a meta-repo
Go
1
star
37

win32-display-data

Rust
1
star