43 Folders

Back to Work

Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.

Join us via RSS, iTunes, or at 5by5.tv.

”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.

If you know Gvim/vim, please help!

I have a very simple problem with Gvim which I need to figure out and qquite urgently. I spent some 4 hours reading the help and scripts and could not do it.

I need a script which does a very simple thing:

1) take the current selection

2) feed it as command parameter to an application, say foo.exe

3) map it to a key, say f9 (i think I figured out the last part)

What I want to do is : select "text", press f9, execute foo.exe text

Sorry for posting this topic - I would not if I was not completely desperate.

mwr's picture

This article (section "Filtering text...

This article (section "Filtering text through external filters") indicates that you can feed a selection to a given command, but it might not be exactly what you wanted. First, the selection would be fed to the command's standard input instead of as command-line parameters. Second, the selection would be replaced with the printed output of the command.

If you have control over the program, you can work around both of those differences. Exercise left to the reader and all.




An Oblique Strategy:
Honor thy error as a hidden intention


Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed


Merlin used to crank. He’s not cranking any more.

This is an essay about family, priorities, and Shakey’s Pizza, and it’s probably the best thing he’s written. »

Scared Shitless

Merlin’s scared. You’re scared. Everybody is scared.

This is the video of Merlin’s keynote at Webstock 2011. The one where he cried. You should watch it. »