When I was in high school I found Sublime Text and learned “multiple cursors”. Since then, I’ve transitioned to vscode, mainly because I need LSP (without too much configuration work) for my work.
I keep hearing about how modal editing is faster and I would like to switch to a more performant editor. I’ve been looking at helix, as the 4th generation of the vi line of editors. Is anyone using it? Is it any good for the main code editor?
The problem that I have is that learning new editing keybindings would probably take me a month of time, before I get to the same amount of productivity (if I ever get here at all). So I’m looking for advice of people who have already done that before.
My code editing does involve a lot of “ctrl-arrow” to move around words, “ctrl-shift-arrow” to select words, “home/end” to move to beginning/end of the line, “ctrl-d” for “new cursor at next occurrence”, “shift-alt-down” for “new cursor in the line below”, “ctrl-shift-f” for “format file” and a few more to move around using LSP-provided “declaration”/“usages”.
I would have to unlearn all of that.
Also, I do use “ctrl-arrow” to edit this post. Have you changed keybindings in firefox too?
I’ve tried to learn Vim in the past but IMO it is not worth it at all. In a world without multiple cursors… sure, maybe. With multiple cursors? No way. I can can edit just as fast as I’ve seen any Vim user do it, and without having to remember a gazillion mnemonics and deal with the silly modal thing.
Multiple cursor editing even has some significant advantages over Vim style, e.g. it’s interactive, so you can do your edit gradually and go back if you make a mistake. Rather than having to write a complex command and only finding out it if works at the end. (If you’ve used regex find & replace you’ll understand that problem.)
I’ll probably get downvoted for this since Vim is kind of a cult, and Vim users get a sense of superiority from it. Kind of like audiophiles - they don’t appreciate it if you tell them their £10k valve amp doesn’t actually sound any better than your £1k digital amp.
For editing on remote computers I use VSCode remote or Micro for quick tasks.
On windows i use vscodium, on linux neovim.
As others say i think helix is cool, but the limited customization is kind of meh for me. I love the keybinds for it though.
Android Studio or VSCode usually.
But really, there’s no single best option here - use whatever works the best with you and the tech you’re targeting. The same advice applies for programming languages, libraries and just about everything in tech
Depends on what device I’m using. On my tower(s), I’m typically reaching for Rider, Pycharm, or Zed. On my laptop(s) it’s pretty much always Helix or Zed. On servers it’s vim 100% baby. I’ve gotten pretty comfortable working with theses tools, so I haven’t really needed to look into alternatives at all.
Is the lack of debugger in Zed not a problem for you?
Nah. When I’m using Zed it’s typically for Elixir/Erlang and I’m usually run debugging tools outside of Zed in a separate shell. When I’m using
iex
and/orobserver
I like to use a full screen terminal on a separate workspace/tab than the editor itself
Vscode. I am surprised to see a lot of people still use sublime text. I was a long hold out on that one but it’s just so much worse than vscode in every way.
I’ve moved on from vim to neovim, and I think I’ll continue using something in that family in the future. It’s a pretty stable experience overall, but the inclusion of LSPs and tree-sitter have been good improvements too.
Ultimately editors are tools, similar to keyboards, os-es, screens, chairs, shoes and so on. There are some objective quality differences between a well-constructed tool and some slapdash nonsense, and there are a huge amount of subjective quality differences. What suits me may not suit you, and vice versa.
It’s generally good to try out some new (to you) stuff and see if you like it. If you do, great; if you don’t, well, now you know. I think my worst experience was with Acme (or Wily? can’t remember), during a phase where I experimented with Plan 9 stuff. Ultimately very not my cup of tea, but apparently Rob Pike (who made it) and some other gophers still enjoy it? Which is good for them, just like it’s good for me that I can choose not to use it. It’s just personal tastes, and I still think it’s good that I gave it a go.
The debate over holding down modifier keys vs modes is also a part of the Emacs vs vi debate from many decades ago. There might be some statistics for what works best for the most people now, but again, use what suits you. And try some new stuff when you get curious, it’s generally good for you.
I used to use vim but imo it’s not worth the time it requires to configure to get working properly. These days I don’t code without a debugger so if there’s not a good way to set breakpoints I don’t even start
Why do people use vscode over codium? (Minus the two people who actually know the answer)
I switched to and exclusively used vim for about a year. I switched back to Sublime one day, and found I was like 10x more productive and comfortable.
Just use the editor you like. There’s no right or wrong answer!
… And btw, Sublime 4 has improved LSP support. Just install the base LSP plugin + plugins for the languages you want. Some even give the option to install the LSP server automatically if if’s not detected.
nano is the best (imho) for up to medium size files. It’s preinstalled in most Linux boxes , it’s simple and flexible enough, takes a minimal amount of time to learn basic for keys and then use them all the time
You should check out Micro. It’s a slightly more sane alternative to nano:
VSCode with the Vim plugin most of the time. Vim if I’m just editing something small and was already in a terminal.
Every IDE worth trying has Vim mode or a plugin for it, you don’t need to use actual Vim to benefit from it!
VS Code with your favorite plugins is pretty fantastic for any editing in my experience. I’ve tried others and they do seem to work well, but not well enough to warrant switching, and they often come with quirks that are just annoying enough to make me want to switch back.
I suggest trying others to know what’s out there, even if you ultimately end up back on VS Code.
Don’t Speculate
Go to Twitch/YouTube. Watch a senior Vim/Jetbrains/Emacs/VS Code/Helix churn out code for a hackathon/advent-of-code, and see what you are (or are not!) missing out on.
If you have “how the hell did they just do that” moments, figure out what that feature is, and STEAL IT. If its too hard to steal, then you are probably being limited by your editor.
- If you’re going to try modal editors, sooner is exponentially better. Probably start with Vim bindings for VS Code.
- If you’re not going to go modal, then make absolutely sure you don’t bottom out. To be frank, Ctrl+D is the tip of the iceberg. Half the benefit of modal editors is, mastery is mandatory; they chase you around with a 10k volt taser until you’ve got 100 instinctual shortcuts. Hardly anyone mentions this but Go beyond/outside your editor: At the OS level, use spacebar as a modifier key, where holding spacebar converts your WASD into arrow keys. Then disable your normal arrow keys. Something like that will get you vim-like benefits, but in every app, and without a learning bump instead of a learning mountain. For VS Code, get cursor jumper extensions like Mario (block jumper), get cursor-alignment extensions, write boatloads of custom code snippets, get a macro record+replay extension, make a jump-to-next quote, jump to next bracket, install sequential number generator extension, a case change (camel case, snake case, etc) extension, sort lines, case-preserving rename. If you can avoid bottoming out, and keep learning, you’ll likely never feel that you are missing out on whatever modal editor people are swearing by.
I get this, but an IDE should be invisible and grow as you do and not require you to learn lots of janky things before it becomes a little bit useful for you.
Need the basics, great, here they are. Don’t understand some advanced feature? Well the IDE has it here, but it isn’t in your way, mess with it as and when you want. It’ll still be there.
I don’t think one IDE does everything for different languages and its ok to swap editors depending on your workflow, your project and your ever-changing skillset.
I get this, but
Why not say “I get this, and …” ?
I don’t think the idea of a learn-as-you-go editor goes against the idea of watching skilled devs with their favorite tool
I use JetBrains Rider for dotnet (with Vim emulation), VS Code for general misc code editing (with Vim emulation), and NeoVim for quick in-terminal edits and Git workflows. I even have vi-mode enabled in my terminals, but I haven’t bothered trying to do it in browser yet.
My experience is that modal editing is only a little faster, but it’s much more comfy, even fun! I enjoy coding with modal editing much more so than modeless. Being able to zip around the code without having to move my fingers to the arrow cluster just feels nice.
cat << EOF # [[content here]] EOF > file.txt
On a more serious note: Neovim for quick file-edits, doom-emacs as my IDE.
Doom-emacs does most of the stuff you are already using out of the box, is highly configurable and it lets you use vim-keybindings. It’s also free (as in freedom) software!
this, evil is the real 4th generation vi