On Wed, Jul 19, 2006 at 04:41:56PM -0700, Gary Johnson wrote:
> On 2006-07-19, John Reese <[EMAIL PROTECTED]> wrote:
[snip]
> >  from myproject.something.blar.blag import Bok
> > if you put the cursor over Bok and hit gf, no dice.
> 
> I wouldn't expect that to work because Bok is not a file but an 
> object within the file myproject/something/blar/blag.py.  If you put 
> the cursor over "myproject.something.blar.blag", on the other hand, 
> it should open that file.
> 
> > If the import
> > line is rewritten as
> >  import myproject.something.blar.blag.Bok as Bok
> > and you put the cursor over the second word, it works fine.
> 
> I would expect that to work, and it confirms that your 'path' is set 
> correctly.
> 
> All that being said, I'm new at using vim to edit Python files, so I 
> may be misunderstanding something.
> 
> Regards,
> Gary

     I think that Gary is right about the distinction between an object
and a file.  Have you tried setting the 'define' option to recognize
these lines?  I am not sure if this will work, but if it does, then you
could use "]d" (without the quotes) on "Bok" anywhere in your file, and
it would take you to the "import" line.  Then you could use "gf" on the
file name.

HTH                                     --Benji Fisher

Reply via email to