Vi iMproved usage improved
Under urging from Miles, I’ve put BBEdit in a drawer and gone over to using Vim as my main editor. I’ve been using Vim for a while now, but I’m not proficient enough with it to use it as fluidly as I use BB.
I’m trying to learn a bit more now though. I’m kind of trying to resist buying a book. I don’t really get along with the interactive help.
Anyway, one thing I found out from the newbiedoc project, was how to set up macros, particularly insert-mode macros:
imap <h1 <h1></h1>
This macro types “<h1></h1>”, positions the cursor between the two tags and goes into insert mode. Useful. There’s a lot more you can do, Vim supports functions as well, so I’ll have to get into those. I wonder if it’s possible to do the kind of things that you can do with the Perl regex pattern modifier e
. That would be handy. I really need to conquer Vim’s regex syntax, I keep tripping up at the moment.
Now I’m reading Bram Moolenaar’s Seven habits of effective text editing. It’s pretty damn informative.