On Sat, 23 Sep 2006 at 12:49am, Yakov Lerner wrote: > On 9/23/06, Hari Krishna Dara <[EMAIL PROTECTED]> wrote: > > > > I am wondering if it is possible to copy a file in the windows explorer > > (MS windows) and then access the filename(s) from vim/gvim. I know there > > are workarounds like dnd and sendto powertoy to send the filename to > > clipboard, but they are not that convenience, as they either require > > using the mouse or you need to use several key strokes. > > It is easy to add SendTo items to file explorer. I think I had > a trick that added a SendTo item and when you selected it, > it puts filename to the clipboard. But I forgot how exactly I > did it, and (2) it does require mouse, although yuo can do it > with keyborad shortcuts like Shift-F10 ... I'm not using windows > anymore, forgot it. I was also using the Rename trick: > choose rename file in explorer, press Ctrl-C, and you have > filename in the clipboard. > > Yakov
The SendTo works, I currently have it, but it will just open a new instance. If you use the Vim installer, it creates "Open With" context menu entries which are better, as you can open with existing windows. However, this is not what I want, and I realize I am not clear about one thing here. I don't want to open the file, I just want to get the filename at the command-line (or insert the filename into the current buffer, say as a string constant). The reason I mentioned dnd is if you start the command mode, and then dnd a file, Vim nicely inserts its filename instead of actually loading the file. I want the same functionality without having to do dnd or open the file first. The best I can think of is if Vim can understand this format, and extract filename(s) it will be very useful (at least for me). I use the rename trick often, but this will not get the entire path into the clipboard, just the name. -- Thanks, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com