43 Folders

43 Folders feed subscription icon - Shiny!Time, Attention, and Creative Work. After 4 years and a lot of productivity pr0n, we’re shifting gears. Re-learn how to use 43 Folders. Then back to work. [»]

”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.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
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.

About very_desperate

 
EXPLORE 43Folders THE GOOD STUFF

An Oblique Strategy:
Discover the recipes you are using and abandon them


STAY IN THE LOOP:

Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed

Inbox Zero

The original 43 Folders series looking at the skills, tools, and attitude needed to empty your email inbox — and then keep it that way. Don’t miss the free video of Merlin’s Inbox Zero presentation.

Making Time

3-part series on attention management for artists and makers. Read Bad Correspondence, The Job You Think You Have, and One Clear Line.