E-Scribe : a programmer’s blog

About Me

PBX I'm Paul Bissex. I build web applications using open source software, especially Django. Started my career doing graphic design for newspapers and magazines in the '90s. Then wrote tech commentary and reviews for Wired, Salon, Chicago Tribune, and others you never heard of. Then I built operations software at a photography school. Then I helped big media serve 40 million pages a day. Then I worked on a translation services API doing millions of dollars of business. Now I'm building the core platform of a global startup accelerator. Feel free to email me.


I co-wrote "Python Web Development with Django". It was the first book to cover the long-awaited Django 1.0. Published by Addison-Wesley and still in print!


Built using Django, served with gunicorn and nginx. The database is SQLite. Hosted on a FreeBSD VPS at Johncompanies.com. Comment-spam protection by Akismet.


Pile o'Tags

Stuff I Use

Bitbucket, Debian Linux, Django, Emacs, FreeBSD, Git, jQuery, LaunchBar, macOS, Markdown, Mercurial, Python, S3, SQLite, Sublime Text, xmonad

Spam Report

At least 237138 pieces of comment spam killed since 2008, mostly via Akismet.

How to use vim, really

I'm an Emacs man myself. I've never really used vim at all, and I use vi only for crontabs and commit messages. I've always grasped in the abstract the potential advantages of its modal editing, but that's as far as it ever went.

Jonathan McPherson's site has a great introduction to using vim that opened my eyes. His explanations of vim's features offer just the right amount of detail. Most importantly he explains why particular commands are a good idea. Not explaining that is one of the classic failings of manpages -- and I suspect that the vi manpage is the beginning and end of many users' attempts to learn it. They learn about insert mode, command mode, loading and saving files, and that's about it. Luckily, those just happen to be the prerequisites for McPherson's tutorial. Clever fellow.

His most important bit of general advice:

In general, you want to spend as little of your time in vim's insert mode as possible, because in that mode it acts like a dumb editor. This is why most vim novices spend so much time in insert mode -- it makes vim easy to use. But vim's real power lies in command mode! You'll find that the better you know vim, the less time you will spend in insert mode.

I'll never be a full convert (I've sold my soul to TextMate, and in the shell I'm happy with Emacs), but I'm definitely going to pull up that page the next time I need to use vi.


Monday, January 9th, 2006

0 comments pending approval
Comment from Robert Loomans , later that day

If you want to use emacs for commit messages and crontab editing, then set the EDITOR environment variable.

For bash:

export EDITOR=emacs

and add it toyour shell startup scripts.

For bash:

echo 'export EDITOR=emacs' >>.bash_profile

Comment from Paul , later that day

Oh, I know -- but thanks!

I've often left my $EDITOR as vi just to make sure I am forced to use it once in a while -- figuring that some dark day I'd be on a box with no Emacs and would be mighty embarassed not to remember how to make simple edits.

Comment from Faried Nawaz , 1 week later

Even better -- set EDITOR and VISUAL to "emacsclient", and start gnuserv inside a running emacs process.

Comment from Kamen , 3 years later

Yeah, I know Textmate takes many souls with it's pretty GUI, but hey, if you force yourself to use vim a while, You'll find many ways to make it beautiful to you.

That and you'll be ruined forever because whenever you go into any other editor you'll be frustrated that ESC doesn't respond.

Comments are closed for this post. But I welcome questions/comments via email or Twitter.