[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: starting an app in the current directory
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-12-16 0:03:41
[Download RAW message or body]

On Saturday 15 December 2001 21:21, Jerome Yuzyk wrote:
> On Friday 14 December 2001 04:13 am, David Faure wrote:
> > On Friday 14 December 2001 01:15, Jerome Yuzyk wrote:
> > > I have associated VIM (gvim?) with *.txt. I like to use KFM to open
> > > files with middle-click. How do I tell VIM to open the file and stay
> > > in the directory the file came from? VIM always opens the file from
> > > $HOME.
> >
> > See my recent reply about the inexisting notion of "current dir" in a
> > graphical environment (I guess it was on kde-devel).
> 
> I would argue there is a "current dir": the place where the file came 
> from, the folder I was looking at when I opened the file.

There isn't always a file to open. What's the current dir if you open
an application from the K menu ?
What if you open an application with 3 files as parameter, all from
different dirs (ok, that's a bit hard to do from a GUI, although Konqueror's
treeview allows to do that).

> > Solution is simple, change the Exec line to
> > sh -c "cd %d ; vim %f"
> 
> I tried this in the Menu Editor with gvim but %d and %f don't get through.

Err, that's a bit vague. Did the .desktop file get modified ?
(see ~/.kde/share/applnk/*/gvim.desktop or vim.desktop)
What happens exactly ?

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic