Vi/Emacs differences are due to keyboards

I’ve been using Vim and Emacs side by side for the last week or two, one with code in it and the other with org-mode.  It made me realize that one of the main reason the interfaces are so different, vim with mode switching, emacs with so many modifier keys are because of the keyboards they came from.

If you think about Vi being used on a ADM3A terminal keyboard you’ll see the Esc key to switch modes is much more prominent than on a modern keyboard and HJKL have arrows on them for movement.

In the case of Emacs if you look at a Symbolics Lisp machine “Space Cadet” keyboard you see there are so  many modifier keys that can be utilized.

The interfaces in each editor is not necessarily the result of some ideology about how editing should be handled, but are a product of the computing environment which they were invented in.


How to sort text using vim

In the newer vim 7 there is a :sort command. This is much easier to remember and works cross platform than using the external command.

If you have an older version of vim on unix you can use an external sort command. Move the cursor to the first line to be sorted.
ma Mark the first line as mark a.
Move to the bottom of the text to be sorted.
!`asort The ! command tells Vim to run the text through UNIX command. The `a tell the editor that the text to be worked on starts at the current line and ends at mark a. The command that the text is to go through is sort.

Insanely Assembly

I just finished reading “Revolution in the Valley – The Insanely Great Story of How The Mac Was Made” by Andy Hertzfeld. I thought I knew many of the stories about the mac’s development, but there are so many more in this book. I never knew how much of the original OS was written in assembly language, I guess I always had assumed it was written in C or Pascal. 128k of memory is so incredibly small, even in those days.

%d bloggers like this: