going-flying.com gemini git repository
fa7ec88ec455b80c81f31745f8731a71cc519460 - Matthew Ernisse - 1650558085
new post
diff --git a/images/27/kitsune-apr-21-2022.png b/images/27/kitsune-apr-21-2022.png new file mode 100644 index 0000000..e51ee10 Binary files /dev/null and b/images/27/kitsune-apr-21-2022.png differ diff --git a/images/27/kowz-jan-14-2002.png b/images/27/kowz-jan-14-2002.png new file mode 100644 index 0000000..a26533e Binary files /dev/null and b/images/27/kowz-jan-14-2002.png differ diff --git a/images/27/tp.png b/images/27/tp.png new file mode 100644 index 0000000..72d2097 Binary files /dev/null and b/images/27/tp.png differ diff --git a/users/mernisse/articles/27.gmi b/users/mernisse/articles/27.gmi new file mode 100644 index 0000000..2d66626 --- /dev/null +++ b/users/mernisse/articles/27.gmi @@ -0,0 +1,131 @@ +--- +Title: Workflows or how I tried to give up and love Emacs +Date: 04/21/2022 12:21 + +I've been going over the various things that have crept into my day-to-day +computing and evaluating them. In some cases I've found things that needed +maintenance (perhaps a future post about refactoring my mutt[1] +configuration is called for), and in others I've taken the opportunity to +evaluate alternatives. + +=> http://www.mutt.org [1] mutt homepage + +## Current Workflow + +To understand the context of what's to come I think it's useful to give a +little insight into how I use computers. I spend a lot of time in terminal +windows. I settled on 80x46 (ish) as a default size over 20 years ago [2] +because it fit well on the monitor size and resolution of the day and +even though I've moved on from 2048x768 on 17 inch 4:3 monitors to +5120x1440 on 27 inch 16:9 monitors [3] I still find the size works well. +I tend to also have a full screen terminal kicking around for when I get +absorbed in something that doesn't need a GUI application (eg: writing +software that doesn't emit a web page). I tend to go through phases of +lots of windows versus lots of tmux windows depending on how focused I am. + +=> /images/27/kowz-jan-14-2002.png Screenshot from 2002 [2] +=> /images/27/kitsune-apr-21-2022a.png Screenshot from 2022 [3] + +It turns out that I rarely use GUI apps other than browsers. I do find +it funny that time has moved on enough that the kids have taken to call +console (or terminal, the nuance of the differences are even older than +I am) applications 'TUI apps', highlighting I guess the fact that now +the GUI is the default mode and that the outlier is an application that +*just* uses text as opposed to only two short decades ago when the opposite +was true. + +I taught myself to program on Borland Turbo Pascal which was a typical +DOS screen editor / IDE [4]. For those who aren't familiar most DOS editors +(post the edlin era of line editors that is) were composed of text character +based graphics and featured mouse support and drop down menus and dialog +boxes. They were a precursor to, and existed along side Windows +applications. When I moved on to Linux I started out using a similar +style of editor before eventually falling into vi. It just so happened +that one of my first IT jobs was wrangling Sun hardware and vi was installed +by default while my previous editor was not. It was a steep curve at first +but I now have over 20 years of muscle memory carrying me along. I have +tried GUI editors over the years but I just don't like them. + +=> /images/27/tp.png [4] Borland Turbo Pascal 7.0 + +## Emacs + +The remaining editor that I never really gave a try was Emacs [5]. I've +been aware of it all along, it was impossible to grow up online before the +Internet became popular and not at least *witness* some of the vi versus +Emacs holy wars that took place just about anywhere one could have a +conversation. I never really understood what all the fuss was about, +being happy to have a tool that gets the job done and all. + +=> https://www.gnu.org/software/emacs/ [5] Emacs homepage + +So, I switched to Emacs for about a month. I honestly gave it a solid +try, trying not to use vi at all. At first it was very difficult to stop +the various habits of using a modal editor, constantly whacking the escape +key before moving the cursor around, or trying the old standby commands +like `>}` or `dG`. After about a week things started to settle in, though +I found myself using M-x a lot. One of the key things I wanted to do was +to get used to *how* Emacs worked before I went changing it with things +like evil-mode or drastically re-binding keys. I even went so far as to +cobble together a couple Emacs Lisp functions that produce the boilerplate +for both blog and gemlog posts. I eventually even went so far as to +start screwing around with `lsp-mode`, which starts turning Emacs into a +full on IDE. + +And around this time the strain on my pinky started to set in and I +discovered the main philosophical difference between Emacs and vi. +Vi is a UNIX tool. That is to say it aims to do one thing, well. That +thing is editing text files. You combine it with other tools like +tmux and mutt and slrn and you get the ability to edit files, read and +compose e-mail and USENET news. With Emacs you do *all of that in Emacs*. +Emacs has modules to do all of those things and more. It is less a text +editor and more a framework to build applications upon. + +So what did I think? + +### Pros + +Emacs is a mature and still vibrant piece of software. There are many +enthusiastic users and developers out there. It is available on just about +every operating system these days and is customizable beyond anything most +people would ever care to do with it. If I were to point at two features +that stand head-and-shoulders above literally any other editor I have +ever used, including things like VSCode and Sublime Text it would have +to be `magit` and `tramp`. Seriously. The power that comes baked into +the editor in just those two things is frankly astounding. The fact that +they are built as Emacs Lisp modules is a testament to the power of the +language and environment. + +### Cons + +It's sort of hard to explain, the beginning of the end of the experiment +came when I discovered myself losing some of the muscle memory for vi. I +admit it scared me. I felt like I had to make a choice. Now part of this +is my insistence of trying to work with the default key bindings in Emacs to +get a sense of how the software wanted to be used but it sort of became +more than that. I felt like I was about to have to make a broader decision +than I was really prepared to. Did I want to give in and embrace the +do-everything-in-here mentality or keep my box of bespoke tools. + +There were other things I never quite got right either. I couldn't quite +get Emacs to handle indentation the way I prefer (I'm a hard-tab guy, don't +@ me) and that was starting to cause issues with Python scripts which +is the most common language I use these days. I was also starting to +get cramps from using CTRL and ALT so much (even after re-mapping Caps Lock +to CTRL). I don't think of those as deal breakers though since I'm sure +there are ways to bend Emacs to my will and fix them, it will just take +time. + +## Next Steps? + +So according to `M-=` I am 1127 words into this and I suppose it is time +to discuss where I've decided to go from here. I have written this post +in Emacs as a nod to the conclusion which is that I intend to go back and +try to live with both. There are just too many situations where I want +a real bourne shell and the terseness of vi, but the power of Emacs, +especially the IDE features and the VCS features of `magit` are just too +tempting. The beautiful thing is that with enough tweaking I really hope +to have both. + + +=> https://www.going-flying.com/blog/give-up-and-love-emacs.html (Crossposted to my blog)