Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helix [Vim-compatible Editor] #105

Open
nelsonic opened this issue Sep 28, 2022 · 16 comments
Open

Helix [Vim-compatible Editor] #105

nelsonic opened this issue Sep 28, 2022 · 16 comments
Assignees
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality

Comments

@nelsonic
Copy link
Member

https://helix-editor.com is a non-graphical text/code editor written in Rust, it shares many key-bindings with Vim.
image

https://github.com/helix-editor/helix
image

Via: Helix 🧬 the Rust Powered Development Environment: https://youtu.be/xHebvTGOdH8

image

@nelsonic
Copy link
Member Author

nelsonic commented Oct 7, 2022

Diving in: 🏊

brew install helix

Configuring ... https://docs.helix-editor.com/configuration.html

All keyboard shortcuts in a single page: https://cheatography.com/hiddenmonkey/cheat-sheets/helix/

@nelsonic
Copy link
Member Author

nelsonic commented Oct 7, 2022

@nelsonic
Copy link
Member Author

brew install helix
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
buf                          dotnet@6                     grammarly-languageserver     licensed                     nemu                         sapling                      stylelint
busted                       erigon                       hermit                       luacheck                     oauth2c                      souffle                      zf
clusterawsadm                evtx                         kubefirst                    metals                       [email protected]                      spectral-cli
code-cli                     go-task                      libisofs                     naga-cli                     portablegl                   standard
==> New Casks
ankerwork                         cursr                             elephas                           overt                             tsh                               vincelwt-chatgpt

@nelsonic
Copy link
Member Author

Tried to open Helix:

helix .

Got:

zsh: command not found: helix

That's because the command to open it is:

hx

Cause writing "helix" is way too many keystrokes! 😜

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Helix Text Editor: Better than Neovim? https://youtu.be/9Zj-wiQ9_Xw
image

@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality discuss Share your constructive thoughts on how to make progress with this issue labels Dec 16, 2022
@nelsonic nelsonic self-assigned this Dec 16, 2022
@nelsonic
Copy link
Member Author

nelsonic commented Jan 8, 2023

Helix: an editor hopping story (NeovimConf 2022 Talk): https://youtu.be/tGYvUXYN-c0

@nelsonic nelsonic mentioned this issue Feb 2, 2023
@nelsonic nelsonic changed the title Helix [Editor] Helix [Vim-compatible Editor] Feb 10, 2023
@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Themes: https://docs.helix-editor.com/themes.html

mkdir -p ~/.config/helix/themes
hx ~/.config/helix/themes/sonokai

paste the contents of: https://raw.githubusercontent.com/CptPotato/helix-themes/main/schemes/sonokai

then:

wq!

And then in the editor you're in:

:theme sonokai

Before:
image

After:
image

Pretty straightforward to add a different theme. ✅

@nelsonic
Copy link
Member Author

Almost any VIM theme works.

@nelsonic
Copy link
Member Author

There are already quite a few themes built-in. Select a new one by typing :theme

image

To test-drive all the themes in: https://github.com/CptPotato/helix-themes

cd /tmp
git clone [email protected]:CptPotato/helix-themes.git
cp -r ./helix-themes/schemes/* ~/.config/helix/themes/

@nelsonic
Copy link
Member Author

e.g: :theme everforest_dark

image

nelsonic added a commit to dwyl/learn-vim that referenced this issue Feb 11, 2023
@nelsonic
Copy link
Member Author

I can see this becoming my default/goto editor; it has everything I need and is very fast.
A couple of annoyances but nothing major.
The biggest barrier to entry is memorising the commands / shortcuts.
Think I'm going to have to make a video about this.

@nelsonic
Copy link
Member Author

Just lost some work when accidentally quit Helix 😢
Went looking for auto-save and found: https://docs.helix-editor.com/master/configuration.html
Created the ~/.config/helix/config.toml file with the following contents:

theme = "onedark"

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

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

[editor.file-picker]
hidden = false

auto-save = true

Got the following error:

Bad config: unknown field `auto-save`, expected one of `hidden`, `follow-symlinks`, `parents`, `ignore`, `git-ignore`, `git-global`, `git-exclude`, `max-depth` for key `editor.file-picker` at line 12 column 1
Press <ENTER> to continue with default config

That's because my auto-save = true was in the "wrong" part of the file ... 🙄
It needed to be in the [editor] section to be parsed correctly. (lame...)

This worked:

theme = "onedark"

[editor]
line-number = "relative"
mouse = false
auto-save = true

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

[editor.file-picker]
hidden = false

Back to work. 🧑‍💻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant