2012-08-31

Slow Typist

I’ve been thinking today about the fact that I’m such a slow/inaccurate typist.

I wonder if that’s what causes Vim to feel somewhat annoying to me. When I get trying to go fast in Vim, I find myself often making mistakes. Emacs slows me down a little bit and maybe that makes it a little more forgiving. Also, the lack of modal editing, means that I’m having to hit a key chord rather than banging a sequence of keys to do whatever I’m trying to do.

I type somewhere between 30 and 50 WPM when I’m trying, depending on how the typing program measures.

I guess the problem is more that I’m a fairly inaccurate typist, rather than just a slow one.

I have wondered if the fact that I’m slow should make Vim more attractive, because I can leverage it’s better commands for copying and duplication, however, the fact that I’m often inaccurate removes a lot of the benefit of using it, because even if it can overcome my slowness via copying, it can’t overcome my inaccuracy.

Keys Instead of Mouse

I’m trying at the moment (I don’t know how long it will last), to avoid using the mouse as much as possible for my general computing. I can basically do anything I need to at the command like via only keyboard. And since I’m using Xmonad as my window manager and Vimium is a browser plugin, I can do most of the non-windows GUI specific stuff fine without using my mouse.

About the only time I really need to reach for the mouse is when I pull up a Windows VM to use Windows specific programs, or when I’m using MonoDevelop, which is either not as keyboard friendly as the rest of my environment, or I haven’t taken the time to properly learn it’s particular shortcuts.

Vim vs Emacs Keybindings

One of the reasons I’m trying to figure out which version of keybindings to focus on, is that because I’m trying to be keyboard based, I would like to basically have to use only one set of keybindings to control the various programs I’m using.

However, it seems to be the case that the best keyboard driven apps or plugins, tend to focus on either Vim or Emacs keybindings and don’t do a great job of providing for the other style. So I may just have to be content to switch back and forth between those bindings depending on what program I’m using. Strangely enough, that doesn’t actually seem to cause me that much trouble, as long as I’m actually switching between different applications.

The other day I was editing code in Vim, and using the Erlang shell which uses Emacs style keybindings by default, and switching back and forth between them using Xmonad. I really didn’t have any trouble at all using the correct key scheme in the right place.

Emacs Backup File Junk

The other day I spent some time cleaning out cruft from my .emacs file. One of the things I took out at the time was the bit of code that makes Emacs put all the backup copies of files it edits into one directory rather than dropping them in the same directory as the file that is being edited.

As a result, Emacs is now a pain to use in situations like the blog generation where I invoke the editor as part of an automated build process. Now those backup files become part of the generated blog posts.

There are a few solutions:

  • Re-copy the code to cause Emacs to use a dedicated backup directory
  • Change the blog build process to ignore files that are Emacs backups.
  • Use Vim instead of Emacs

Currently I’m going with using Vim instead of Emacs for editing any file where auto-generated files could interfere with other build processes. I’m aware that is something like the height of laziness, but I don’t really want to deal with either of the other options right now, even if it just involves re-copying some code out of an old copy of the config file.

Vim Typing Tutor

I took the time today to track down an old blog article I’d remembered reading about using Vim as a typing tutor.

Vim comes with a diff facility that with a bit of ingenious prodding can do a reasonable job of checking whether you are accurately typing an example text.

Here’s the command from the blog post as a single line:

vimdiff -o <inputfile> /tmp/temp.txt "+exe 2 \"wincmd w\"" "+normal 1000i "  "+diffupdate" "+go 1" "+startinsert"

Combined with the commands wc to count the words / characters in the input file and the time command to find out how long you took to type the file, you can also get a reasonable estimate of your typing speed.

Standard

One thought on “2012-08-31

  1. Pingback: Emacs Typing Tutor | Actually

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s