fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Bobulous :rust: :codeberg:

I created a crib sheet for the text editor:

bobulous.org.uk/coding/Helix-c

Best viewed on a big screen.

As usual I intended the new page to be compact and concise; and as usual it ended up being huge and rambling. Hopefully it'll still be of use to people who aren't fully familiar with the most useful keys and commands. (And just maybe of vague interest to users who are thinking about trying Helix.)

Let me know if you spot anything incorrect.

www.bobulous.org.ukHelix crib sheetA quick reference for the key bindings and modes used in the multi-modal text editor Helix.

@bobulous damn this is pretty cool. i've been looking into migrating off neovim after seeing how much stuff is going on with the tons of plugins i use and now it's easier for me to try #helix! thanks! <3

@unspeaker Yeah, I've not tried Neovim, but I keep reading about how much work is required in terms of custom configuration and plugins in order to get it ready for software development.

Helix does seem to be ready to go, so long as the required LSP is installed for your chosen language(s). The only things I've added to my config file are custom rulers, soft-wrapping enabled, and my preferred theme name.

@bobulous think i can get by with some tree-sitters + a simpler autocomplete than a whole-ass language server?

@bobulous i have no use for advanced ide functionality and lowkey hate the lsp after i tried to wrap an existing one and it turned out it's about as much of a "protocol" as defi crypto "protocols" are actual protocols...

@unspeaker At a guess, I reckon it depends on the language.

I reckon Rust development would be painful without the rust-analyzer running in the background to warn that the borrow checker was getting angry.

Possibly other languages wouldn't need active evaluation, though.

@bobulous

for #rust i run #bacon github.com/Canop/bacon in a #tmux split, used to have inline checking in my #neovim with #ale but it was updating too slowly so i nixed it (or it fell off along the way? i don't remember... plugins, man...)

most worried about #typescript really - that's the one they've really got locked down. but now that i've got a cheat sheet, i'll give it a spin and see for myself!

background code checker. Contribute to Canop/bacon development by creating an account on GitHub.
GitHubGitHub - Canop/bacon: background code checkerbackground code checker. Contribute to Canop/bacon development by creating an account on GitHub.

@unspeaker In Helix rust-analyzer works nicely for me, though I did find that building large projects (e.g. the massive Servo project) would cause rust-analyzer to go so crazy that it would actually crash Helix.

Eventually learned that if you tell the cargo build command to use only about 3/4 of CPU cores, this crash does not happen. So I guess it was getting greedy and locking up the CPU wholesale, causing rust-analyzer and Helix to fall over dead.

With that fixed, it's been fine since.

@bobulous been using for years and did not know about I and A, replacing 3 keys with 1

@tshepang Yeah, and I keep forgetting the key combo which lets you rotate text back and forth through selected positions: Alt+( and Alt+). Not something you need very often, but saves a lot of time and effort when you do realise a use for it.

@bobulous In the LSP section you made a few mistake. Commenting is ctrl+c, not just c, and if I'm not mistaken the symbol pickers are on space+s/S not s/S.

@bobulous Also why did you separate the `[´ and `]´ section? Wouldn't it be simpler to have a simple section?

@bobulous Anyway, that's a good cheat sheet, thanks for sharing

@robinm Were you looking at the page on a mobile/small screen by any chance? I realise now that without fancy nested borders (that only fit on a bigger screen) it wasn't clear that the "LSP actions" sections are part of the "Space menu" and "Goto menu" sections. So it wasn't clear, for example, that you already have to be in the Space menu in order to hit 'c' to comment the selected lines.

I've clarified the "LSP actions" headings to hopefully make it clearer that they belong to specific menus.

@robinm As for the '[' and ']' menus, I did think about merging them into one combined section, but then it becomes necessary to write an explanation of which menu does first/previous and which does last/next within the text for each key.

I aimed to have the text as compact as possible for each key (though in some cases it still ended up quite wordy) so I settled on giving each menu its own section on the page.

@bobulous Indeed, I was on my phone. If possible, try to add the border around the word "space" in the title to make it more obvious that you have to press this key