[ANN] New awesome vim plug-in using Ruby bindings

Felipe Contreras felipe.contreras at gmail.com
Mon Apr 23 05:05:04 PDT 2012


If you reply to all, remove Ryan Harper, as the address doesn't work.
Or just reply here.


2012/4/23 Felipe Contreras <felipe.contreras at gmail.com>:
> I've never been particularly happy with the code of the vim plug-in,
> but it sort of did the job, after some fixes, and has been working
> great so far for most of my needs even though it's clearly very rough
> on the edges.
> However, I'm recently in need of been able to read HTML mails, and
> just trying to add that code was a nightmare, so I decided to look for
> alternatives, including Anton's Python vim plug-in (which is nice, but
> doesn't have support for that), and even learning emacs, to use what
> most people here use (but it turns out the HTML messages don't work
> correctly there either). I also tried the various mutt+notmuch
> options, and none fit the bill.
> So, since I'm a big fan of Ruby, I decided to try my luck writing a
> plug-in from scratch. It took me one weekend, but I'm pretty happy
> with the result. This plug-in has already essentially all the
> functionality of the current one, but it's much, *much* simpler (only
> 600) lines of code.
> And in addition has many more features:
>  * Gradual searches; you don't have to wait for the whole search to finish,
>   sort of like the 'less' command
>  * Proper multi-part handling; finds out if there's text/plain, or if
>   text/html, converts it using elinks
>  * Extract all attachments
>  * Open message with mutt (or any external application that can open an mbox)
>  * More proper UTF-8 handling
>  * Configurable key mappings
>  * Much simpler, cleaner, beautiful, and extensible code (only 600 lines!)
> I just added support to reply mails today, and after trying a bit I
> got complaints from the vger.kernel.org server, but people using mutt
> have had the same complaint, so I don't know, I wouldn't reply totally
> on that. *But* you can open the mail with mutt, or any other client
> that you want, as a fall-back option (the command to run is
> configurable).
> Sure, it depends on the Ruby bindings from notmuch (but those are easy
> to compile), and on the 'mail' library from Ruby (easy to install),
> but it makes things much, *much* easier. There might be ways to make
> certain dependencies optional, and make this, and the current plug-in
> converge somehow (maybe even the python one too), but for now I don't
> see any reason to look back.
> I can't wait to start using it for real :)
> Enjoy ;)
> https://github.com/felipec/notmuch-vim-ruby
> P.S. I CC'ed a bunch of people that have showed interest in the vim
> interface, I hope you don't mind

Felipe Contreras

More information about the notmuch mailing list