,--------,
;    __,   ;
;   `>     ;
;   `--,   ;
;     '    ;
 `--------` 

Emacs - Tinkerer's Dream

Emacs is one of those things that you either love or hate. There is a multitude of options and customizations to choose from, so a beginner may feel a bit overwhelmed at first.

Part I - The Beginning

Installing Emacs is pretty standard process for any Linux user. Simply use your favourite package manager and you are pretty much good to go. That is, unless you want all the greatest and newest features that GNU Emacs offers. Some stable distros may bundle older version of Emacs in their repos, in which case you may want to use unofficial Flatpak or Snap releases, or compile it from source.

Part II - Defaults

Emacs default light theme always struck me as a bit incomplete. Don't get me wrong, it can certainly look nice, however, I personally am a fan of dark, more toned down themes.

Keybindings are another thing. Emacs' keybindings are widely used across various shells, line editors such as readline, programs that emulate Emacs' keybindings etc. They are alright, however, I never could use majority of them them with default keyboard layout. Having to constantly use Ctrl along with some other key just to move around was not pleasant.

I have experimented many times with various custom bindings, from installing quite amazing Vim emulator, Evil, to writing my own mode that would change bindings to more Vim-like ones. Recently however, I've straight up remapped arrow keys to more comfortable place and haven't really had any issues thus far. Cause let me tell ya, spending almost a month writing your own keyboard layout in Emacs just to barely use it later is not pleasant.

Many settings can be changed via user friendly Customize interface, however, more complex adjustments, such as writing your own keymap, adding more complex hooks and functions must be done through Emacs' native language - Emacs Lisp

Part III - Customization Rabbit Hole

By this point, I have customized my Emacs quite a bit, added couple custom functions, customized the look and feel of the editor. My custom config file is around 400 lines long, not counting my custom keymap and functions that I decided to comment out after a while. One good thing that came out of it was the fact that I managed to learn Emacs Lisp along the way, which may or may not come in handy one of these days. I cannot deny that it was certainly an interesting experience.

I've also created two color schemes, one which I use currently and one that was my attempt at creating light theme. I should get around to tweaking and making it look nice one day or another.

I admit, some of my customizations may or may not have been pretty silly. For example, take a look at this function which moves me to the end of the line, however, when called again, it displays a message at the bottom of the screen.

I first define the function as interactive (meaning that it can be called by just typing its name or be bound to a key), then, using pretty not-so-standard if statement, I check if the last command executed was this one. If it was, simply print a silly little message, if not, move the cursor to the end of the line.

As you might have seen, elisp syntax is a bit funky, but it boils down to something like this

(if [condition] [true] [false])

I might have already gone too deep into it here, but I think it is pretty simple to read after a while.

Closing thoughts

GNU Emacs is pretty darn fascinating piece of software. I didn't go in depth into some of the more advanced features, like dynamically replacing commonly used phrases with symbols and icons to make code prettier, dynamic spellchecking, integration with GNU Debugger, being able to browse the web, write emails, use outlining and calendar, Org Mode and much, much more. Emacs is not a mere text editor, it is an entire OS, which you might or might not have heard before.

Overall, I am pretty darn satisfied with this text editor, even if I tend to rewrite and implement a lot of features just to barely use them afterwards. It gives me a lot of power to tweak and customize it to my needs.

References