Tag: vim

Delicious automation with Vimperator

Delicious might have been bought by mighty money makers now, but there’s still no add-on for Firefox 4 available. Thanks to the great Vimperator add-on which wraps VIM functionality inside Firefox, it is easy as cake to get a great automated ‘save to delicious’ workflow going.

So you know why you should bother reading this article any further: All I need to save to delicious is type two keys inside firefox. Then Delicious pops up, marked text already filled in as note.. you know the Delicious drill. When I’m done typing tags, all I do is hit [enter] again and the URL is saved to Delicious.

So, how do you get this functionality going? First, save the Delicious bookmarklet to your bookmarks. Then the magic happens.

Firefox is able to tag bookmarks with keywords, so it can look them up in the smartbar. We’ll use that functionality in combination with a VIM macro and we’re set. It’s only three steps, so bare with me.

1. Save a keyword to you delicious bookmarklet

2. Record the VIM macro

  • Find a website you like
  • Record the macro
    • q to start recording
    • d will be the macro name
    • o to open a bookmark
    • delicous, because that was the keyword
    • [enter] to open the page
    • [esc] to leave insert mode
    • q to save the macro

3. Save your lovely page to Delicious

4. Done

The next time you want to save a page to delicious, just hit @d to automatically redo what you just did by hand.

Note that there’s no end in usability here – you can do that with your readability bookmarklet, you can post a page to your favorite news aggregator and so on and so forth.

3 comments » | articles

Fullscreen for GVIM in Linux

To me, fullscreen does magic in terms of gained productivity – there’s no distraction anywhere; I can perfectly focus on the work ahead. MacVim has a nice fullscreen feature(CMD+SHIFT+F). I don’t want to miss it in my Linux environments, though.

In GVIM, there is a little manual labour involved, because in Linux, the window manager is responsible for, well.. managing windows – GVIM itself can’t implement “fullscreen”.

To achieve true fullscreen capabilities in GVIM and Linux, there are two steps involved:

  • Make a shortcut in your window manager for fullscreen
  • Get rid of GVIMs’ menu and toolbar

I’ll demo #1 for KDE:

Get rid of the menu:

And the toolbar:

Of course, you could edit your vimrc and set those flags globally.

Now, enjoy your editing with SHIFT+ALT+F.

5 comments » | articles

VIM to write mails in Thunderbird

While at work, I have to use Windows. Since Windows doesn’t ship with a decent mail/calendar solution (nope, Outlook doesn’t qualiy – keywords “winmail.dat” and “ics support” should trigger your memory), I had to build a custom setup.

Thunderbird is a good basis and does the job well. It’s sleek and has good IMAP support. Combine that with plugins for VCS support, Lightning for an integrated calendar and the provider for Google Calendar, you find yourself with a decent toolset. What kept bugging me is editing the mails.  Coming from mutt/VIM, I might be biased on that one. Heck, I’m even using the Vimperator plugin in Firefox and find that it brightens each and every day.

Anyway, there is release to that pain! There’s a plugin called “External Editor” – it works in Windows as it does in real OSs and it’s actually quite a charm as you can see. You can find all you need on globs.org. Just follow the instructions and you’ll be happy.

Tips: Customize your mail view to show the feature “External Editor” or use the pre-defined shortcut CTRL+e to open your custom editor (that is VIM for me^^).

Have fun and enjoy the sweet life(;  

2 comments » | articles

« Previous Entries