Author of the inform7 mode here.
Beginner tip 1: use cua-mode
!!! It makes regular ctrl-v, ctrl-c, etc work in your Emacs. That’ll help you get started!
Beginner tip 2: don’t start with raw Emacs. That’s like making a kit car your first car. I really really think beginners should just use Doom Emacs instead. I’ve used vim, and then visual studio code, and then plain Emacs, and then Spacemacs, and finally I’ve settled on Doom for several important reasons.
Beginner tip 3: if you like Obsidian and/or would like a personal wiki / mind map note taking app built directly into your editor, check out org-roam
. You can even embed wikilinks to notes into your Inform code if you want, turning your code itself into a personal wiki too. I’ve heard of people doing stuff lile that, anyway
Beginner tip 4: every function and variable in emacs has documentation you can bring up in-editor. Use that!
Why Doom over stock emacs?
The benefits of emacs is that it is less of an editor per se and more of a sort of mini operating system oriented around an extremely dynamic, live, modifiable system and a very interesting sort of text and graphical hybrid interface paradigm. 90% of it is written in lisp, which is also its extension language, with only a small core written in c, so almost every part of the program is dynamically available to you at runtime for you to inspect, modify, or replace at will. It’s kind of like the live image environments of Smalltalk, and it’s basically the last surviving Lisp Machine OS, running in a window on your computer.
To give you a sense of this, emacs has a built-in command that will let you run any arbitrary lisp expression that your cursor is located in (from any text file that you have open) in the current editor context, so for instance if I decide that I suddenly want to add a command to my editor with a certain key binding, or I want to run some code to tell it to do something, or I decide I want to temporarily replace an existing editor command with a new one, I just open up a blank file, type in the lisp I want, hit a key command, and my editor has been modified. Hell, a command to bring up a lisp REPL is one of the core basic emacs commands, and long time Emacs users embed emacs lisp expressions in the comments of their other coding projects so they can just run them to perform certain edits on the section of code near the comment!
The problem with this is that, by default, emacs is essentially an operating environment designed for handling every sort of text related use case you can imagine, but it isn’t really a text editor. Or, at least, not a good one. So you will have to build one yourself. That’s cool, but a lot of work writing a many hundred line configuration file, including dozens and dozens of plugins and lisp libraries, to get to the point where it feels like you are at feature parity with something like Visual Studio Code. You’ll have to worry about whether the packages you are using to build that functionality have been updated recently enough, whether they are compatible, whether there are any subsidiary or related packages that will vastly improve your experience with that package and bring in more functionality you need, and most importantly, you’ll have to do continual maintenance on your configuration file throughout the entire time that you are using emacs as an editor as updates to the editor, the packages, and your development environment happen.
That’s not a really great value proposition, despite the power of emacs, in my opinion. That’s where Doom comes in: like Spacemacs, Doom is essentially a pre-configured distribution of emacs. It does all the work for you of building a configuration of emacs and maintaining it, including having terminal commands for diagnosing why your configuration may not work, updating your configuration and associated packages, and so on. It then presents you with a simple and effective customization framework in lisp for you to use if you want to further customize it, that abstract away all of the nitty gritty annoying details and integrates your customizations with itself so that it can diagnose any problems with your own customizations as well. It also gives you a list of something like over a hundred “layers”, which represent entire programming languages or categories of features (like workspaces, project management, and so on) that you can enable or disable depending on what you want to do with your editor and how you want it to behave. Under the cover, those layers are usually around a dozen carefully selected and integrated emacs lisp packages that the maintainers of Doom have assembled to give you the best version of that feature or behavior or language environment, and provided with an extensive default configuration. So for instance, I can just uncomment the rust line in my Doom init.el file and I will get an entire IDE class development environment for rust downloaded and installed when I run my doomsync command, one that is very comparable to something like intellij. Essentially, Doom takes the advanced operating environment that emacs provides and builds an actual modern editor out of it, instead of you having to do that yourself.
Additionally, a lot of people in this thread are saying that you should learn the default emacs key bindings, but I really think that’s the wrong move. The default emacs key bindings are designed to carry semantic meaning, not to be ergonomic, which means that you very often get long key chords involving many modifier keys that will seriously, and I really mean this, probably give you RSI. Instead, you should lean on the fact that emacs actually has the best Vim emulation in existence, evil-mode
, which is so good that it’s actually superior to the original, and that Doom emacs comes with that mode pre-enabled, and extended so that every corner of the editor has had its default he bindings replaced with Vim style key bindings, because Vim key bindings are infinitely more productive and most importantly infinitely more ergonomic.
Why Doom over Spacemacs?
Mostly because Doom is extremely fast, relatively simple and easy to understand so you can more easily figure out what’s going on under the hood, better configured by default, with its layers tending to have a lot more interesting and helpful packages installed by default and far more optional packages to customize behavior. Furthermore, unlike Spacemacs, which in my experience has been buggy and not directed by any kind of coherent vision, Doom has never once bugged out on me, and feels very coherent, like its own editor that was intentionally designed on top of emacs.