jack: (Default)
[personal profile] jack
If you look at something like morse code, you'll see that the common letters tend to have short representations, and the rare letters longer ones. That mapping is far from perfect for many reasons, but it makes sense for conveying a message quickly. Even if the varying lengths mean that it might take more bits to send "abcdefghijklmnopqrstuvwxyz" than if you always used the most obvious binary representation. (This is not exact for morse code, for starters because you're assumed to get spaces between the letters for "free". But will be true for alphabets encoded to a bitstream on a computer, and is systematised in something like http://en.wikipedia.org/wiki/Huffman_coding, used in many compression streams.)

I wanted to say something similar about encoding special characters in strings, or mixing HTML and a programming language in the same source file (do you have a way of including HTML in your programming language, or vice versa?) but it didn't quite come together.

However, I was thinking about it in the context of vi. Most text editors have -- almost all the time -- pressing 'a' meaning "put an 'a' into the document". This means that anything else you want to do -- copying, pasting, editing, etc, etc -- will almost certainly involve holding down ctrl. vi is the opposite -- you switch between an insert mode, where letter keys insert letters, and normal mode, where they do editing features. This feels unspeakably ridiculous the first time you try it: entering text is the simplest and first feature you use in a text editor, and if it requires a special mode, you will probably quit the editor and never use it again.

However, it eminently makes sense: most people alternate between typing for a while, and then making several edits. I already have a reflex to hit a key after I finish typing -- I hit the shortcut for 'save'. So it is a lot easier and efficient if you're used to it.

This was put into my head by reading a blog post somewhere by someone who reckoned that vi's default keyboard interface was better than emacs, but emacs ability to do everything under ths sun and then some is better than emacs, and switched from vim to emacs-with-vi-key-bindings, thus pissing off everyone on both sides of the holy war :)

Date: 2011-06-02 12:02 am (UTC)
seryn: flowers (Default)
From: [personal profile] seryn
vi is tiny. There are definitely times when that was a benefit. But if I have to use it regularly, I want vim with the color highlighting, mouse controls, and features. Then there's not a lot of memory advantage anymore.

I've been looking for a really excellent editor and haven't had vi on this computer for a long time now so maybe it would be a good time to investigate emacs. Open Office doesn't run, Notepad doesn't (really) print, Wordpad is just stupid, and I'm not going to pay Microsoft for Word when I use it like 3 times a year. But honestly, what I'm looking for is all the power of the unix tools but correctly mimicking something that's using the Windows interfaces so the printing works, the file save is standard, and things generally work.

But I'm here now looking for fiction-writing tools and coming from a nerd background; I have to say "search and replace" is no regexp.

Active Recent Entries