Posted by acrollet

Ugly regex:

grep '\(^\|[^0-9]\)\{1\}\([345]\{1\}[0-9]\{3\}\|6011\)\{1\}[-]\?[0-9]\{4\}[-]\?\
       [0-9]\{2\}[-]\?[0-9]\{2\}-\?[0-9]\{1,4\}\($\|[^0-9]\)\{1\}' filename
Posted by acrollet

So, we are finally getting closer to the long-awaited post (ha!) about posting to drupal from vim. I've been having a lot of fun making this plug-in suit my needs, and making it truly easy to post. Python hasn't been too hard to learn - vim scripting is truly a weird, weird language.

Anyway, here is a (very) rough draft of the plugin. If you want to use it, place it in your ~/.vim/plugin/ directory. You will need to apply add1sun's patch from http://drupal.org/node/224006 to make the blog API work basically at all, and you'll need my patch from http://drupal.org/node/243907 for file/image uploads to work. Tagging isn't working quite right yet - I made kind of a hacky patch, but I think I'm going to have to re-think my approach and make a module for that...

quick usage summary:

  • :ListPosts 5 will display a (extremely) minimal browser with the 5 most recent posts. (You can modify the number of posts to suit, or leave it off, and it will get the 10 most recent posts)

Paying Uncle Sam

05 Apr 2008
Posted by acrollet

Well, I'm working on taxes today, so "normal" posting will resume later. Planning a write-up on my improvements to the Vim blogging client I posted about earlier... (tags are working as you can see!)

This is a test entry

04 Apr 2008
Posted by acrollet

I'm posting this from vim with a plugin taken from yyhh.org. If you can read this, it's working ;-)
Update: My modifications are coming along - the following image was uploaded from Vim...

more testing

Posted by acrollet

While I was working on a website migration for work, I found myself wanting a way to preserve formatting without keeping really poorly formatted html. (probably made by Word, a lot of blockquotes instead of list tags, etc.)

Posted by acrollet

So, MacOS offers some emacs key bindings through-out the OS. Great, you say -
but I use vi, and I don't want to waste years of muscle memory! (This makes you
a big geek, by the way - I've come to terms with it...) So, you have two options
- you can:

a) Install viAllOver and hack on
it till it more or less works the way you expect and then realize that it still
doesn't work for Safari textfields, and that this is less than ideal when you're
starting a blog... (this method also requires run-on sentences, apparently.)

more on gyazmail

07 Mar 2008
Posted by acrollet

Anyway, it's been a while since the previous post, but luckily, I have no
readers.

I have been very pleased with gyazmail in the time I've been trying it out,
and have gone ahead and bought it. At only 18 bills, it's probably one of
the times I've been happiest to pay for software ever. I'm all for the free
option, especially if it's open source, but there just isn't a client out
there that is as easy for me to use, and at least more or less keep up with
the flood of email there is to deal with.

The biggest reason is that I never have to take my hands off the keyboard -

Pages