8 ms·
>I've used Helix for all my recreational programming projects (in Rust) for about 6 months and I've written about 10kLOC of code with it. Still using vim at $WO
by MontyCarloHall 4y ago
>I've used Helix for all my recreational programming projects (in Rust) for about 6 months and I've written about 10kLOC of code with it. Still using vim at $WORK for a variety of reasons (giant c++ codebase that does not easily plug in to clangd/LSP), but I might be doing the switch soon.
Do you have some supernatural ability to quickly (re)learn muscle memory for new keybindings? I’d consider myself a fairly advanced vim user, and it took me literally a couple years to get to the point of fluently using complex navigation/editing commands.
I took a look at the Helix documentation, and while it’s definitely “vim inspired,” it’s different enough [0] that I would have to rewire years of muscle memory to be as productive as I am in vim.
There are some very fundamental differences, e.g. the verb/object syntax is reversed in Helix; `dw` in vim is `wd` in Helix. When I want to rewrite a string in vim, I unconsciously type `ci"`; it would take me a long time with Helix to regain that level of fluency.
[0] https://github.com/helix-editor/helix/wiki/Migrating-from-Vim https://github.com/helix-editor/helix/wiki/Migrating-from-Vi...
- jarbus 4y agoI’ve got the same question. One of the major reasons I invest time into vim is because it’s everywhere and so powerful. If I invested time into learning a different set of keys for an editor that isn’t always available, I wouldn’t be able to leverage that power and fluency all the time, and furthermore, would need to switch back and forth between vim and helix keys
- haarts 4y agoI've switch from years of Vim to years of Kakoune and am now trying Helix. While annoying I find I pick up the right keys fairly quick. A week until I get decent productivity back and a couple of months tops to truly get the hang of it. I find it immensely helpful that Kakoune and Helix _make sense_. It is also a great boon that there's visual feedback.
- jzm2k 4y agoSeconding this. I had used Vim for nearly 8 years and felt very comfortable with all the crazy tricks you could do with modal editing but I genuinely felt Kakoune's way of doing modal editing was an improvement so I committed to learning it and it took maybe a month to get comfortable with the new way of editing. I'm really glad I took the plunge because I'm a really happy Kakoune user and I can't think of anything that I miss from Vim.
- halikular 4y agoHow does it improve on neovim? Seems to me like slightly different keybindings to do the exact same thing, you're not saving any keystrokes or fatigue as far as I can tell.
- jzm2k 4y agoIt switches from "action selection" to "selection action" which allows you to first select the thing you want to operate on and only then specify what you want do with it. So for example in Vim you may accidentally select too many characters to delete and then you need to redo the command whereas in Kakoune you can adjust the selection before executing the action. I think one of the best things Kakoune has to offer is that selection mode (visual mode in Vim) is always accessible through <shift><movement> so if I want to select some random number of characters going left, I'll just hold L, or if I want to select all characters until the end of line I'll just press GL whereas gl takes me to the end of line. It makes it so easy to select text. Finally multicursor, it's so good. I've used Kakoune for over a year now and I haven't had need for macros except for maybe 2 times. I didn't know I needed a multicursor before I had tried Kakoune and I would highly suggest anyone to try Kakoune just for the multicursor experience. It allows you to select a pattern using regex and then operate on the matches simultaneous. Kind of like Vim's "visual block" but on steroids.
- lenkite 4y agoselection action is already possible in vim using 'v' or 'V'. But many times, I do want immediate action-operator when I know exactly what I need to operate on. So Kakoune is un-convincing.
- lifehasleft 4y agoThis how I feel about vim too. I’m sure there are editors I would like more but I work on remote servers every day, some of them lightweight, and vim is already going to be on all 500+ of them as part of the OS install.
- jerpint 4y agoThis was my same impression when trying out helix. Really nice and shiny, but all the shortcuts I've spent time creating over the years are gone and not easily reconfigured.
- Casperin 4y agoDon't even try to reconfigure them. Try to learn the editor first as it is. If you think that's crazy-talk, then imagine someone saying they'd like to learn vim, but they find it hard to configure the shortcuts to be like Eclipse. They aren't wrong, but it also doesn't seem like the right approach to learn vim either.
- pigcat 4y agowhat does `ci"` do in vim? I'm decent with vim, but it didn't make sense to me - then I tried it and it didn't do anything.
- thegeomaster 4y agoDeletes text inside the nearest quotes and puts you in insert mode. You probably tried it without being inside a quoted string, that's why it did nothing.
- torarvid 4y agoChange inside doublequotes. You can also do `ci{` or similar to Change inside curly-braces or `di[` to Delete inside square brackets
- exDM69 4y agoCursor needs to be between double quotes (e.g. inside string literal) for ci" to work. See `:help text-objects`.
- Agentlien 4y agoci is "change inner ..." If we use | to mark our cursor, and you have your cursor inside quote: '"he|re"' ci" would replace everything inside giving you '"|"' and putting you in insert mode. cab would aso remove the quotation marks and give you '|' With ce or cw you'd get '"he"' and cE or cW would give you '"he'
- exDM69 4y agoThe keybindings are pretty similar, the paradigm change from verb-noun to noun-verb and the multiple cursor paradigm are bigger changes. I got used to it with my brief affair with Kakoune. The Vim muscle memory will be quite helpful and not a whole lot of unlearning is necessary. hjkl navigation and other familiar concepts are similar in Helix and Vim. Vim ci" translates to Helix mi"c. After the first key press (m), a help dialog pops up.
- hamburglar 4y agohjkl are definitely table stakes for a vim-ish editor, but I also can’t live without 0 and $. Making me move my hand over to find home and end misses the point of hjkl entirely.
- smsx 4y agoI’m just learning helix, but I believe you can move to the end of the line with gl, and i’m sure there’s an equivalent for the beginning.
- halikular 4y agoIs there an alternative for g0, g$ and gj, gk? It will act on wrapped lines like they're separate.
- Casperin 4y agoI opened helix to check it for you. Pressed `g` and had a little popup tell me that following with `h` = line start, `l` = line end, `s` first non-blank in line (plus ~15 other options). My hx doesn't wrap lines, so didn't check `gj` and `gk`.
- halikular 4y agoIf you don't wrap lines how do you write text?
- Casperin 4y agoAfter 20 years of vim I decided to try out Helix back in Feb and never looked back, so I guess I can chime in here. Sure, it took a few days (maybe weeks?) of feeling uncomfortable, but unlike vim, Helix is very approachable. I think you have to be okay with a certain level of feeling uncomfortable if you want to do or learn anything new though. If learning a new editor isn't your thing, then don't. :) I get this same question a lot when people realize that I use Dvorak layout. Sure, yes, it took time to learn. But I was curious if there was something better for me on the other side. It seemed plausible that there would be, so I gave it a shot. In both cases I have been happy with my investment.
- vlmutolo 4y agoSlightly off-topic: how do you manage using an alternative layout with an editor like vim/Helix? I've been trying to figure out how/if to remap the keys in the editor condig. If you remap hjkl to your right-hand home row, that could cause a cascade of other remappings. If you don't, you lose basic navigation with hjkl.
- montefischer 4y agoI use Dvorak, although I regret the choice to learn it instead of Qwerty. If you don’t remap, and I don’t, then you need to use two hands instead of one to navigate. Not a dealbreaker for me though, since by coincidence the places hjkl ended up on Dvorak that makes navigating with them tolerable.
- Casperin 4y agoInstead of qwerty?? Never even considered that a possibility. I also don't remap anything. It's fiiine. You'll get used to it :-)