vim
TwitVim: Twitter in Vim

Bwa ha ha:
TwitVim is a Vim plugin that allows you to post to Twitter and view Twitter timelines.
"The geeky-awesome sensors are off the charts, captain!"
New version released last week.
See also:
How to insert or replace text on multiple lines simultaneously in vim

Let's say you have a text file with a list of to-do items, like this:
* Download iX rar file
* Charge iPod
* Install iX on iPod
* Return Ender's Game to library
* Track down The Snake's Pass by Bram Stoker
* Write post on vim editing trick
In order to better organize and sort the list as you view it, you want to add a [PROJECT] "tag" to each line:
* [PROJECT] Action
Now, to edit your original list, you could go down each line and edit manually. You could even use the . (period) trick and make the same change to each line as desired. But to really speed things up, try this.
- Put your cursor where you want to add the text; in our case, we'll start at the "D" in Download on the first line. Since the first three items in our list belong to the same "IPOD LINUX" project, we'll take care of 'em all at once.
- Type
CTRL-v - Move your cursor down two lines (
jj) to indicate where the changes will be made. - Type
I(capital letter I) - Make your changes; it will only show up on the first line while you're editing.
- When you're done with the changes, hit
ESC-- your edit will be propagated down three lines. - Repeat as necessary.
This leaves us with:
* [IPOD LINUX] Download iX rar file
* [IPOD LINUX] Charge iPod
* [IPOD LINUX] Install iX on iPod
* [READING] Return Ender's Game to library
* [READING] Track down The Snake's Pass by Bram Stoker
* [BLOG] Write post on vim editing trick
For more, see:
- Vim Tips Wiki: "Inserting text in multiple lines"
- iX Project
- The Snake's Pass
First month with Ubuntu and the new netbook
It was a long time coming, but nearly exactly a month ago, I made a switch for my home computer, buying an Acer Aspire One netbook[1] and installing Ubuntu Netbook Edition 10.04 (Lucid Lynx). Here's excerpts from what I wrote on the new compy that day:
This is the very first journal entry written on my new netbook, an Acer Aspire One. It is running Ubuntu Netbook Edition 10.04, which I've spent much of the night figuring out how to get running. Actually the real issue was getting a USB flash drive to function as a bootable volume, which was my bad -- the actual install was easy as pie. Currently in the background, I am updating the system and software with everything new out of the repositories. And amusingly, I'm actually writing this in vi, not vim, as the latter has not yet been installed. :D
I can't say how much this moment means to me. I have been anticipating it for years now: my own computer running Linux full-time. Not as a virtual machine, not a compy I'm borrowing. But my own, purchased myself, running my chosen free+open operating system.
Some points for later (potential) expansion:
Managed to get this working without starting up Windows, although while I was troubleshooting the USB drive, it did get to the first screen of installing Windows. But it never went all the way into the hated OS.
Everything about this purchase, including the choice of UNE, happened in a bit of a hurry this week, though I'd been scoping out the Aspire One for a while now. After researching UNE, I decided to go with it for the time being rather than the Debian+XFCE combo I had concluded would be best for me. Which brings me to the next point:
After getting the general update completed, one of the next steps is getting all the Mono-infected stuff uninstalled. Which brings me to the next next point:
This is all about choice, this software -- and thanks to Linux, I don't have to make an irrevocable decision about what desktop environment I'll be running, nor what version. Hell, I could throw a GUI-less, modular window manager and kiss the icon good-bye! ;D
In the interim, I've run into a few issues, but mostly it's been a very smooth transition. I've mentioned several times on this site the last few years that I've been researching and experimenting with Linux -- I really credit that process for preparing me well for this adjustment period.
The few speed bumps so far:
- There's a nasty bug reportedly involving the version of X.org on 10.04, which can be induced running Firefox with the NoScript extension -- the bug is not with NoScript or Firefox itself, but it can cause an immediate crash of the X server, which is disconcerting to say the least. Fixes are being worked on.
- I was not able to switch over to Ubuntu at work yet on my new MacBook Pro there -- still some hardware issues with the brand-new machine, so I'm going to probably just wait a few months and come back to it. I've got too many irons in the fire there with various big projects, so while I could get it working with some time, I just don't have that to spare at the moment.
- There is a bug with the Gnome Power Manager panel applet (part of the standard Startup Applications - see Preferences) that will on occasion misread the battery on the Acer and wind up hibernating the computer after 5 minutes off the AC power. The fix for now is to disable the Power Manager applet, reboot, and install the acpi command-line program (sudo apt-get install acpi) to read the true battery level, amongst other things.
- The netbook's keyboard is surprisingly easy to type on, and I've mostly adjusted to the different arrangement of Control/Function/Super/Alt modifier keys -- although it's hard to adjust back when I'm on a Mac with its Function/Control/Option/Command -- who thought it was a good idea to put the "Fn" key out on the end? To combat this, and since I've seen it recommended in many Unix-geek circles over the years, I've remapped my Caps Lock key on both computers to be another Control key.[2]
- My only real complaint on the Aspire One keyboard is that the standalone Pg Up/Pg Dn keys nestled into the arrow keys make the arrows a difficult target. That and the dedicated scroll area on the right of the trackpad is a bit hard to find at times.
Since I've already been using a number of open-source apps for a long time now, or at least programs that are available on both Mac and Linux, there haven't been many transition pangs there. I dig the UNE experience so far, though I keep trying out the normal (or should that be gnormal? ;) Gnome login as well at times -- there are things to recommend from both.
It was all a bit scary at first, making the leap after 20+ years on Macs, but the anxiety faded quickly. It was well worth the effort. This will be a curious analogy, but it's a little bit like after I quit smoking (2003) after doing so for 17 years. Not the nasty physical addiction stuff, but more the label of Smoker being tossed aside, along with all that that meant to me and other people. Like this year, letting the Mac User label slough off, leaving behind something new.
More, I'm sure, to come in the near future.
Tangentially, I am likely moving blogging platforms here on Celsius1414.com, so please excuse my dust over the next month or so.
[1] Normally ~$300, on sale for $50 less at Target.
[2] Still getting used to it, and it's going to take a lot of time to retrain the muscle memory, but it's already better.
surround.vim
Via yesterday's Vimcasts episode, "Converting markdown to structured HTML with a macro", check out this most-excellent Vim plugin:
Surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML tags, and more. The plugin provides mappings to easily delete, change and add such surroundings in pairs. While it works under Vim 6, much of the functionality requires Vim 7.
Anybody editing HTML or other markup can definitely use this.
Vimcasts: Spell checking in Vim
The latest Vimcasts is online and covers how to set up spell checking in Vim.
While you're at it, head over to The Geek Stuff and check out this related article, "Vi and Vim Editor: 3 Steps To Enable Thesaurus Option".
VimCasts.org
Want to get a bunch of Vim knowledge from a personal tutor? Subscribe to Drew Neil's excellent Vimcasts immediately!
Vimcasts publishes regular screencasts about the Vim text editor. Episodes are kept short - typically less than 5 minutes, never more than 10. The aim is to provide something in each episode that you can take away and use.
Vimcasts is produced by Drew Neil (aka nelstrom), who came to Vim from TextMate. He made the switch when starting work at a company that uses Linux workstations. His choice of text editor was influenced by colleagues.
vifm
An alternative to the Midnight Commander file manager utility. It's available in the Ubuntu repositories (sudo apt-get install vifm) and via MacPorts (sudo port install vifm).
Vifm is a ncurses based file manager with vi like keybindings. If you use vi, vifm gives you complete keyboard control over your files without having to learn a new set of commands.
While you're getting in touch with your inner geek, don't forget vimwiki, the personal wiki also based on vim:
