this post was submitted on 23 Dec 2023
10 points (85.7% liked)

Emacs

1978 readers
43 users here now

Our infinitely powerful editor.

founded 4 years ago
MODERATORS
 

cross-posted from: https://lemmy.ml/post/9648279

I would like to premise this with the following:

  • The best approach is probably just testing out each and every editor that interests me until I've found what works best for me.
    • However, I wonder to what degree a test as such would be representative when the likes of Emacs and (Neo)Vim are considered; both of which are known for being a life time learning process.
  • I don't literally expect Emacs or (Neo)Vim to be drop-in replacements for any IDE. Some of the most basic IDE-functions are absent by default and some (perhaps more advanced) functionality might simply not be attainable at all.
  • I am not interested in anything that remotely resembles a flame war. The community at Lemmy has so far been very kind to me; let's keep it that way 😜.

Motivation

I've had experiences with Atom, VS Code and some of Jetbrains' IDEs like Pycharm and Rider. While I've been generally content with all of them, it leaves a bad taste in my mouth whenever I'm forced to switch IDEs because their lifetimes and/or lack of extensibility doesn't allow me to responsibly continue using them. As such, I'm interested in a long time investment that will grow as I will. Both Emacs and (Neo)Vim have passed the test of time and I honestly don't think they'll cease to exist in the upcoming decades, that's why I would love to start using either one of them.

Furthermore, Vi(m) keybindings seem to be somewhat ubiquitous and almost any IDE offers some support. As such, improving my Vi(m)-game should only net-positive my productivity (at least eventually). Also, fluency will benefit me whenever I'm remote accessing any random server as they will always have Vi(m) installed. Thankfully, this doesn't force me to use Vi(m) (or Neovim) just yet, because Emacs offers with Evil perhaps the single best Vi(m) implementation; outside of native Vi(m)*.

My setup:

  • I'm on a custom image of uBlue using their startingpoint as template. For those unaware; an oversimplification would be that it is Fedora Silverblue with some extras.
  • As such, I would like to have my developer environments local and have used Distrobox to that extent using steps similar to the ones outlined over here. But I'm not married to that specific way of utilizing local containers. So please feel free to recommend me something that's at least as good.
  • If I go for Emacs, then I will definitely rely on Evil.
  • If possible, I would like to use it for C#, Python and Rust. Furthermore, I engage in editing Bash scripts, Dockerfiles, Linux config files, texts written in Latex and/or Markdown and other files written in Nix or JSON. As both are very extensible, I don't expect any issues, but I might be wrong.

Questions:

  • First of all, does it make sense for me to only consider these two?
  • Can the split between Vim and Neovim be interpreted as the first schism and as such be a forebode for what's yet to come?
  • Google Trends suggests that Neo(Vim) is ever-popular. On the other hand; not only is Emacs relatively less popular, but its popularity seems to be slightly declining. Should this worry me regarding their long-time future? Especially considering that a thriving community is literally the lifeline for both of them.
  • For those that have used both extensively, which one do you prefer (if any) and why?
  • While I understand that the power of both of them lies primarily in how one can literally make them behave however suits their workflow best. Therefore, the use of premade configs and/or starter kits/distributions should (ideally) only be used either temporary or as a starting point. However, at this point, they provide a decent showcase of what each 'platform' has to offer. So:
you are viewing a single comment's thread
view the rest of the comments
[–] mindlessLump 2 points 11 months ago (1 children)

I would roll your own config with both. I use NeoVim every day. It’s not my main IDE, mainly due to working with Java dev and needing a debugger. But need to edit a command? ctrl-x ctrl-e. Want to pipe output of a command to an editor? ‘| vim -‘ Vim macros can save you so much time, and are fun to implement. It’s an essential tool imo. As I understand it, eMacs is better used as a standalone application than in the terminal. My primary use for emacs is org mode. You can export org mode to multiple formats including markdown. Easy to share notes to a wiki or readme. You can also execute code blocks within org mode using babel. Have a csv that you want to turn into an ascii table? Org mode can do that as well, and you can add functions to columns. You’ll have to enable these packages in your config. Hint, figure out “use package” from the start. Back to my first bit of advice, figure out what you want to do in each, and pull in a few packages to your config. You’ll have the basics down. Then when you want to grab a batteries included framework, you’ll have some opinions on which one you might want to use. NvChad looks cool, but it almost seems too much for me, and I’m attached to my simple configuration. I don’t want tabs in vim because I have a cool fuzzy search for buffers. That being said, in eMacs, I have a package that implements tabs. Anyway, I say just start using them!

[–] [email protected] 2 points 11 months ago (1 children)

It’s not my main IDE, mainly due to working with Java dev and needing a debugger.

I thought debugging was taken care of by nvim-dap and similar plug-ins. I suspect they aren't as feature-complete then compared to those found on 'real' IDEs. Or is it perhaps something else?

eMacs is better used as a standalone application than in the terminal.

Yeah, support for using Emacs within a terminal is mainly there for legacy purposes if I remember correctly. But IIRC Neovim also allows usage outside of the terminal. Which begs the question; what functionality does this bring to the table for Neovim?

My primary use for emacs is org mode.

I haven't even started using Emacs extensively, but from what I've seen it definitely seems to be its killer function. Though, I'm interested to know if you've tried using Emacs as an IDE? If so, how did that go?

[–] mindlessLump 2 points 11 months ago (1 children)

Yes, you can debug with vim + plugins, but I haven’t taken the time to set it up. You can do the same in emacs. I haven’t tried emacs as an IDE. I’ve read that LSP support is pretty good at this point, and I’m interested to set it up. I think spacemacs makes that pretty easy. I have LSP hooked up in nvim and have near parity with VS Code, but I’ve been wanting to swap my config to a Lua based one.

I think running neovim as a standalone app is rooted in the desire to manage it with a window manager, but for me, being in the terminal is a huge plus. Pair that with tmux, and you can piece together an IDE outside of nvim as well, say, running gdb in a window compiling your app in another, and having nvim open in the next with convenient hotkeys to manage the windows and copy text fluidly between them.

[–] [email protected] 1 points 11 months ago (1 children)

I think running neovim as a standalone app is rooted in the desire to manage it with a window manager

Interesting. Makes sense.

but for me, being in the terminal is a huge plus. Pair that with tmux, and you can piece together an IDE outside of nvim as well, say, running gdb in a window compiling your app in another, and having nvim open in the next with convenient hotkeys to manage the windows and copy text fluidly between them.

I haven't worked much with either NeoVim or Tmux, but I assume there's a way to restore your most recent 'terminal-state'. Which, in turn, enables one to start working as soon as they've opened either one of NeoVim or Tmux. Am I right?

[–] mindlessLump 2 points 11 months ago (1 children)

Not sure about that. There may be a plugin, or you could write maybe write a script, but that is not default behavior.

[–] [email protected] 2 points 11 months ago

Ah okay. This conversation has been lovely. Thank you from the bottom of my heart for that 😊!