copy highlighted text to a temporary file

2006-06-27 Thread Dimitriy V. Masterov
I am trying to find a way to copy text that I've highlighted with the mouse to a temporary file with a .do extension, so that I might use it in the script below, and then delete it. I am not sure how to proceed from here. Any advice would be greatly appreciated. fun! RunLines() !start

Re: copy highlighted text to a temporary file

2006-06-27 Thread A.J.Mechelynck
Dimitriy V. Masterov wrote: I am trying to find a way to copy text that I've highlighted with the mouse to a temporary file with a .do extension, so that I might use it in the script below, and then delete it. I am not sure how to proceed from here. Any advice would be greatly appreciated. fun!

Re: copy highlighted text to a temporary file

2006-06-27 Thread A.J.Mechelynck
Dimitriy V. Masterov wrote: Thank you very much for your suggestion. I'm still having trouble yanking the highlighted text instead of the line the cursor was on. I was able to do something like this in jEdit using textArea.getSelectedText(). Is there something analogous for Vim? My jEdit code

Re: copy highlighted text to a temporary file

2006-06-27 Thread Benji Fisher
On Tue, Jun 27, 2006 at 03:56:22PM -0400, Dimitriy V. Masterov wrote: Thank you very much for your suggestion. I'm still having trouble yanking the highlighted text instead of the line the cursor was on. I was able to do something like this in jEdit using textArea.getSelectedText(). Is there

Re: copy highlighted text to a temporary file

2006-06-27 Thread Hari Krishna Dara
On Tue, 27 Jun 2006 at 4:51pm, Benji Fisher wrote: On Tue, Jun 27, 2006 at 03:56:22PM -0400, Dimitriy V. Masterov wrote: Thank you very much for your suggestion. I'm still having trouble yanking the highlighted text instead of the line the cursor was on. I was able to do something like

Re: copy highlighted text to a temporary file

2006-06-27 Thread Dimitriy V. Masterov
Many thanks for all your attention. This was awesomely educational. I had to delay the deletion of the file so that Stata would have it to work on. In the end, I wound up with the following script: fun! RunDoLines() let selectedLines = getbufline('%', line('), line(')) if col(')