important that I run Vim.
Looking at the N900 keyboard I don't think Vim would be very usable...
Not sure what you mean. I actually and currently *do* use vim on my N900. With the keyboard.
It's what I use to take notes.
And also make phone calls (a keystroke mapping makes vim read the current line, identify the phone number on it, and call that number).
And also send text messages (a keystroke mapping makes vim identify the phone number at the start of the line, and send the rest of the line to that number as a SMS).
And also read incoming text messages -- handy when I'm driving and can't squint at the screen (a keystroke mapping makes vim call a bash script that pulls the latest text message via SQLite3, and then read it aloud using espeak).
And a similar keystroke automatically sends a reply to whoever sent the SMS, telling him/her that I got the message, but I'm driving and can't respond right now.
And so on, for "silence the N900 for (specified time, default 1 hour) then re-enable sound" because I'm in a meeting, etc. etc.
In fact, I mostly control my N900 from the vim screen, and sometimes from the bash screen; much more fine-grained control than the GUI interface. The hardware keyboard is what makes it usable when driving; with an onscreen keyboard, you couldn't keep your eyes on the road. (Cue the snarky comments about "You should never use your phone when driving, because I don't, and everyone else should be like me.")
Oh, part of the reason Vim works well on my N900 keyboard is because I've redefined it. By defaut each key has a meaning when pressed by itself, or with the Shift key, or with the Fn key. But there's a fourth combination of Shift+Fn key, which by default is the same as the Fn key -- which is completely wasted potential. So, by using the Shift+Fn key combo, I've got 30 extra characters to use, including []{}`|^~% which by default you'd have to call up the virtual keyboard to type. Maybe that's why you think the keyboard is not usable with Vim.
*I* want to be the one in control of the phone
There are lots of automation/scripting apps for Android, or with root you can get a real shell and install the scripting language of your choice.
I'd be interested in a "real" shell/scripting language. Right now I have a bash script for synchronizing various text files (such as my ToDo list) between various laptops/desktops, and I just use the same script for my N900. The script also synchronizes itself, so when I improve the script on my work laptop, for example, the versions on the other laptop and the desktop and, yes, my N900 will update themselves.
I see some really simple tools on Android -- a brief web search produces results like Tasker and AutomateIt, which are great when you want simple things like, say, changing the ringtones every Wednesday afternoon unless your phone is face-down.
I'm looking for things more like, if a SMS comes in, then make a different "SMS arrived" sound depending on who it's from; and if it's from the wife or my parents, then read the SMS out loud unless I'm at my workplace; otherwise forward the SMS contents to my email account. Here's a N900 script for "while I'm at the office, adjust my Google Voice virtual phone settings to not forward phone calls to home". Right now I'm working on something that sends a SMS to my wife telling what freeway exit I'm closest too, and my driving speed, so I don't have to manually text her while driving to let her know when I'll be home.
Tasker falls short in these abilities, to put it mildly; never mind that you can't reuse the scripts for the desktop/laptop. I don't mean to belittle your helpful info; it's just that smartphones like Android devices just aren't in the same league as computers-that-happen-to-have-phones-built-in like the N900. At the same time, I recognize that currently there's nothing quite like the N900 on the market.
So, the other choice that you mention is "with root you can get a real shell". I guess by rooting you mean jailbreaking. CyanogenMod seems to offer a lot of freedom compared to the as-is Android device, although it's a lot easier to achieve on the N900, and without jailbreaking.
How good is the hardware control in CyanogenMod-based scripting? Can you write a bash (or python) script for, say, connecting to a certain wifi? Turning phone off/on? Turning GPS on at pre-programmed intervals, getting a location fix, and then turning off again? If it's capable of that, then I'm going to keep CyanogenMod as my backup plan if nothing feasible comes out by the time my N900's fail.
Thanks for any info you (or anyone else) can provide about CyanogenMod scripting.