I’m relatively new to programming, I’ve been learning C on linux using nano and it’s been very fun. I’ve recently fallen into the emacs/vim rabbithole and I’ve been watching videos about emacs, Doom, spacemacs, neovim and reading comments about people switching from this or that to another config or editor, and I’ve been a bit lost on what to do. Then I realised that I haven’t done any coding and spent all of my time focusing on editors. So here is my question (which has probably been asked many times) : what is the point of investing so much time learning all of this when there are some IDEs that are preconfigured with all the functionality a programmer would need ? Does learning neovim or emacs actually save time in the long run? I know that they’re much more lightweight than IDEs and I’ve been really enjoying using the terminal much more than my time on IntelliJ, but having an easy out of the box visual debugger, refactoring and jump into functions can be really helpful in the long run I think, especially when starting to write actual large programs. Nano is fun, but not a time saver. Why did you chose your editor?

12 points

what is the point of investing so much time learning all of this when there are some IDEs that are preconfigured with all the functionality a programmer would need ?

Editors are a thing you use a lot. They are probably one of the most used tools you will ever use as a programmer. If anything deserve some time investment to learn it is the editor you use. Doing so will pay dividends in the long term. Even one that is preconfigured requires time to learn all those features and how to use them effectively. Time spent configuring is just time spent exploring the features the editor has to offer. Vim and Emacs force you to do this to become on par with other editors, but just because another editor has the tools built in does not mean you don’t still need to spend the time to learn those tools.

Does learning neovim or emacs actually save time in the long run?

Lots of people think so. I personally hate using normal editors these days, modal editors like vim are just far nicer to use and lets me jump around and edit code far faster than normal editors. I cannot comment on emacs though.

I know that they’re much more lightweight than IDEs and I’ve been really enjoying using the terminal much more than my time on IntelliJ, but having an easy out of the box visual debugger, refactoring and jump into functions can be really helpful in the long run I think

You can get all these things in terminal editors. Especially with the LSP (language server protocol) vim and similar editors can support all of the language servers that were created for vscode giving you the same refactoring tools as available in vscode. It is mostly a question of finding the right plug-ins that you require.

Why did you chose your editor?

I learnt vim in uni - cannot remember why exactly any more. But ever since I properly learnt it I have not been able to move back to normal editors anymore. They just feel far more clunky than modal ones. Yes you can get the vim input mode on vscode and other editors - but they are always lacking compaire to the real thing.

Recently though I have switch to helix which is a modal terminal editor inspired by neovim and kakoune - takes the keybinding from kakoune but integrates LSP and treesitter in addition to a lot of the common plugins that you have in vim. I love that it requires basically no configuration to give you what is more of a fully functional IDE but still has all the power of a modal editor. It lacks a plugin architecture though (this is still a work in progress feature) but since it bakes in a lot of what you typically go to plugins for I have never felt it lacking by missing this feature.

permalink
report
reply
3 points

As an alternative to helix, there are lots of preconfigured/opinionated vim/neovim setups. Lunarvim (my choice), chadvim (I think is the name), and more.

All the benefits of the vim plugins etc. With sane defaults. You still have to take time learning everything, and I would probably recommend spending time with configuring a vanilla neovin config to understand how it works then jumping into one of these later, but I’ve found it saves a lot of time configuring and gives you a fantastic starting point.

permalink
report
parent
reply
3 points

I have tried some of these before - and they always felt a bit janky compared to something with everything built in like Helix. You still have to keep lots of plugins up to date and installation is IMO kinda dodgy on most of them - having to run some script to mess with your home directory settings. As someone that like to manage config via config managers I always found these install methods get in the way for me. And they are so complex that manually setting them up is also a huge pain.

Where as helix just works as you would expect straight from your distros repo.

permalink
report
parent
reply
1 point

That’s valid, especially the complexity issue. Everything mostly works, until it doesn’t. And if you have some sort of dep issue or otherwise, you’re now combing through lots of scripts to try to narrow it down and fix it unless you wait for an update.

Personally still find I have saved a lot of time using a preconfiged setup, though everyone could have different experiences.

permalink
report
parent
reply
1 point

Those are a lot of good arguments. Thank you.

permalink
report
parent
reply
5 points

I wrote a comment on a thread with a similar topic elsewhere:

I love vim and am very happy that I’ve learned it, but at the same time I wouldn’t oversell how useful it is. I doubt that it makes you much more productive, although you might look and feel more productive. This is because at the end of the day being good at programming is more important than being good at editing text.

The main reason why I like vim is that it’s fun and because there is a closer mapping between what I want to do and the action of doing it. When editing in vim I usually have an idea of what I want to do which I can “compile” into a set of vim commands that I can quickly type out, usually without having to leave the home row on the keyboard too much. Using a “normal” editor feels sluggish and like I’m having to “dumb down” my actions.

I think that you should learn vim (or emacs) because it’s fun and empowering, or maybe even to occasionally get the opportunity to impress your colleagues. Don’t overthink it though!

permalink
report
reply
5 points

Editing in (neo)vim is akin to live programming in a very terse programming language. You can also create your own commands (keybindings) and repeat snippets multiple times (macros). This is amazingly powerful if you need to convert between two formats or extract some information.

The UI is not a highlight of this editor.

It also takes years before selecting the commands becomes mostly subconscious. It is definitely a long term investment.

permalink
report
reply
3 points
*

Then I realized that I haven’t done any coding and spent all of my time focusing on editors. So here is my question (which has probably been asked many times): what is the point of investing so much time learning all of this when there are some IDEs that are preconfigured with all the functionality a programmer would need ?

I applaud you for realizing this so early on, and acting on it. I spent waaay too much time in rabbit holes, resulting in not doing anything productive and becoming overwhelmed.

In short, learn vim keybindings for text based navigation - that is the game changer in being productive. Activate vim navigation in an IDE. Don’t try to make a terminal based IDE with vim plugins unless that is a hobby.

permalink
report
reply
1 point

I’m happy someone else is considering the time investment. I started using neovim since yesterday for the very purpose of learning key bindings that I deem useful. I’ll then move to a config already made with features I like or an IDE. Thanks !

permalink
report
parent
reply
1 point

give “enabling in the IDE” a shot immediately. The best way to learn what keybindings are useful is by fixing the friction you have when actively using it. When you’ve mastered the basics you can then think “how can I improve this this thing that I hate that takes time”

permalink
report
parent
reply
3 points

To answer your question directly, there are some presets available on the internet that show how to set up Vim (Emacs too, I guess, but I only have experience with Vim) for development in a specific language. Those presets allow for a pretty fast set up and you only need to learn basics then.

Still, compared to UI-based IDE, I’d say that those are handier. After all, most of the time you spend is usually spent on thinking, not traversing the code or typing one. So whatever advantages you will get from navigating Vim quicker they can’t be a major difference in dev speed.

TLDR; choose what feels better, there are plugins for lots of things in console and vice versa, but don’t invest too heavily in an instrument you don’t like after several tries.

permalink
report
reply

Text Editors

!text_editors@programming.dev

Create post

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

Community stats

  • 1

    Monthly active users

  • 16

    Posts

  • 90

    Comments