Archive for May 20th, 2006
I’ve been using vim forever, but I wouldn’t rate myself as anything other than an intermediate user. And that might be a stretch. I still haven’t figured out some basics, like yanking text (my mind still works in a cut-and-paste method I learned from graphical text editors on the Amiga and in Windows). So I have to say “thank goodness for Linux.com and their Vim tips series of articles. This time around, they delve into using marks and jumps:
For example, if you’re typing and decide that you need to set a mark so you can return to a sentence or line of code you’re not entirely happy with, press Esc to leave insert mode, then type ma to set a mark at the spot your cursor was on.You can use any letter in the alphabet, upper or lower case. However, capital letters are global marks, so you should use them only in special circumstances, which I’ll explain in just a bit. It’s not necessary to use them in alphabetical order; you can set mark z right after setting mark a if you like, or skip a altogether and start with z.
To return to the mark you’ve set, enter normal mode (if you’re not in normal mode already) and type `x where x is the letter associated with the mark you want to revisit. The backtick (`) will return you to the exact spot where the mark was set. You can also use the single quote (‘), which will return you to the beginning of the line you were at, but not the exact cursor position.
This is all very good stuff. It’s stuff that I probably should know, but the fact that the article hits the subject as hard as it does makes me think that I might not be alone in not realizing this functionality exists. No matter what, I think this is important stuff for any vim user.
Seriously, who needs Partition Magic when one has easy access to the GParted live CD?
Need a way to resize NTFS partitions, mirror disk images, or otherwise muck about with disk partitions — and don’t want to use a proprietary package like Partition Magic? If so, the GNOME Partition Editor (GParted) is an excellent open source tool for the task. The GParted team released the GParted live CD version 0.2.4-2 this month, so I decided it was a good time to take GParted for a spin.Click here to find out more!
GParted handles Ext2, Ext3, FAT16, FAT32, JFS, ReiserFS, Reiser4, NTFS, XFS, and other filesystem formats. At a bare minimum, GParted can detect, read, copy, and create partitions using those file systems — and, in some cases, can shrink, expand, and move partitions. See the features page on the GParted site for the full rundown on GParted’s capabilities.
It’s been interesting watching parted and its front-ends become more robust. Once upon a time, parted was sure to destroy any partitions you had on your disk. Now, it is rock solid, and can do 70-75% of what Partition Magic can do. For free. With a nice, easy-to-use front end in GParted.
This is good stuff!