Willghatch Blog
Here are some posts. Also, links to RSS and atom feeds. (What is a feed?)
Have you ever noticed that default key bindings are just bad? Look at Windows and CUA and control-p being print, still, to this day when printers are mostly irrelevant. For the vi
text editor, it made sense for Bill Joy to fill out the keyboard with operations that he had written or could easily write in his available time, to put them conveniently in reach. But haven’t we grown beyond that in the time since? Vim’s default key bindings are strained. You have prime real estate with s
bound to the useless substitute-character command, then you have all of these wonky ad-hoc key sequences for much more useful things that you probably don’t use because you can’t remember the keys. As soon as these things are published and people start using them, critical configuration like key bindings immediately ossify. Almost all software has its earliest functionality bound to the most convenient and mnemonic keys, not the most useful. Later features are tacked on with increasingly complicated and non-memorable bindings. Now, years later, we are often left with inflexible software that uses key bindings that are hard to remember, hard to put to good use, and frankly even in the way of innovation and utility for holistic computer use.
Let me tell you a story about key bindings.
Since I published Composiphrase, I thought I would give a list of some other interesting Emacs features or packages that are unrelated to Composiphrase, but that one might want to use with it. The list is not exhaustive, you should also do a web search of favorite Emacs packages. But it’s a good place to start, especially if you like composiphrase and want to try it more seriously.
There is a UI paradigm that I love, and I’ve decided to give it a name: the Text Lens.
One of the best ideas in Vi and Vim, which I rightfully see praised online frequently, is the idea of a “composable text editing language”.
Vi has a bunch of movements, like w
for “forward word”, and some operations, like d
for “delete”, and you can put them together.
dw
deletes forward one word.
You can also add a number: 4dw
deletes 4 words.
Vim adds “text objects”, which are “selection” instead of movement, eg. select a word, a sentence, etc.
You can also compose these with commands, so diw
deletes a word, di)
deletes inside parentheses, etc.
But what if we took the ideas of composability and language more seriously?
As mentioned last time, I’ve been reconsidering visual line mode.
Don’t get me wrong, I love visual line mode.
But vi and its descendants are very line-centric.
Lines are first-class, while every other way of looking at or splitting up the text, or “text object”, is sort of second class.
There are so many features of vi and vim that operate on lines specifically, that just don’t work with other ways of looking at text.
Eg. ex mode operates specifically on lines, or ranges of lines, and specifically not on character regions with partial lines.
Visual line mode and paste work together to operate cleanly on lines.
The default keymap has keys that work extra conveniently on lines.
There is an extra goto-line command, and marks have extra line mode instead of just going to the mark position.
Etc.
While I’ve shed evil-mode, I still want to use modal editing🗽, of course.
I wanted to shed the on-character cursor positioning as discussed previously, among other things.
I considered several modal editing packages in emacs, and... ok, yeah, I wrote my own.
I feel like I need to justify this.
The biggest mistake of vi-style editors is that it positions the cursor on characters instead of between characters.
I’ve given several variations on a talk about Rash, but none have ever previously been put online. Recently I sat down and made a decent quality recording of my Rash talk and made it available on Youtube.
While I haven’t made much time for Rash lately, I hope to start spending small but regular amounts of time on Rash and related projects. Hopefully I’ll be able to push it (and its documentation!) forward.
I’ve started and thrown out a few drafts of a post about NixOS over the last of couple years.
At this point I see blog posts about NixOS so frequently that perhaps there is little left to say.
But I want to say something, so here is an overview of some of my favorite features and most irritating issues.