201
you are viewing a single comment's thread
view the rest of the comments
[-] priapus@sh.itjust.works 2 points 8 months ago

I was also disappointed not to have ex-commands, but I soon realized Helix's use of multiple cursors with commands that support regex can accomplish the same tasks in a way I found more intuitive. Definitely took a bit to get rid of my :%s/new/old/g muscle memory, but Helix's select command works very similarly and just as quickly.

Quickfix commands on the other hand I never used. It seems Helix has some features such as jumping to diagnostics and errors, but it doesn't have the ability to do so automatically after running make like Vim does (afaik). I don't write much C, so I didn't know that feature existed to begin with.

Multiple cursors are a lot better than :s for you standard search and replace, unless you have a really big file at which point helix gets to slow (which isn't that common) but there are a lot of other stuff you can do with ex commands.

I use :make pretty often, vim ships with the ability to parse a lot of compiler/linter outputs out of the box so if you tell it which one with :compiler you get build errors in the quickfix list. I also use :grep a lot. You can do <space>/ to grep in helix but I often find that I want to add command line options to only search in specific directories or for specific file types (we have a large codebase at work). Being able to filter results with :Cfilter, and being able to go back to old quickfix results with :colder is also really nice. Finally, you can use :cdo to apply ex commands to stuff you've matched in the quickfix list.

As an example, if you get a build error because you've renamed a variable in one file but not the places it gets referenced in other files, you can :make to get the build errors in you quickfix list, :Cfilter to narrow it down to only that specific class of error if needed and then do :cdo s/oldName/newName/g to rename the variable in all places that cause errors. You can then go back to the list of all errors with :colder and handle other errors in another way if needed.

I'll have to admit that I don't do this that often so honestly I wouldn't lose out on that much switching to helix (after it gets proper plugin support and someone makes a decent replacement for the fugitive git plugin) but I would feel less powerful not knowing that I have those tools up my sleave lol.

[-] priapus@sh.itjust.works 1 points 8 months ago

Those are some neat features. I hadn't heard of them when I was using Vim. Parsing the compiler output to go straight to the error is very cool. I definitely think plugin support will bring a lot of people to Helix. I don't currently have any features I'm waiting on, but I'm sure I'll find some plugins to make it even better once they're available.

this post was submitted on 27 Feb 2024
201 points (95.9% liked)

Programming

17314 readers
339 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS