Home Download Buy Blog Forum Support

Anyone knows how vintage gf works?

Anyone knows how vintage gf works?

Postby sfranky on Wed Nov 09, 2011 9:50 am

I am trying to make it work in my LaTeX files, but it doesn't seem to be doing anything.. is it supposed to work exactly like in vim?
thanks!
sfranky
 
Posts: 96
Joined: Mon Oct 19, 2009 10:06 pm

Re: Anyone knows how vintage gf works?

Postby jps on Thu Nov 10, 2011 10:40 am

Your best option is to checkout Packages/Vintage/vintage_commands.py
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Anyone knows how vintage gf works?

Postby sfranky on Fri Nov 11, 2011 8:52 am

I'm sorry I can't understand this, I'm not a programmer..
I don't get it though, don't you know if it works for latex files? Does gf accept only specific path formats?
Latex references files either like this: "\include{relativepath/to/file}" or this "\input{relativepath/to/file}"
What does ST2 expect to see in order for gf to work?
sfranky
 
Posts: 96
Joined: Mon Oct 19, 2009 10:06 pm

Re: Anyone knows how vintage gf works?

Postby guillermooo on Wed Dec 14, 2011 9:31 am

gf is quite basic. I haven't doublechecked, but I think it does the following:

Code: Select all
* if the selection is not empty
    * if selected text is the path to an existing file; open it
* else:
    * extend selection to both sides until an "illegal path character" is found
    * if the new selection is a path to an existing file; open it

All paths, if not absolute, are combined with the active view's directory name prior to testing them.

I based this implementation on what I understood Vim's command will do, and what seems to make sense for Sublime Text (Sublime Text maintains a virtual current dir which isn't the same as the actual one.)
guillermooo
 
Posts: 728
Joined: Thu Jul 23, 2009 9:06 am


Return to Technical Support

Who is online

Users browsing this forum: cutmancometh, Exabot [Bot], Google [Bot], Yahoo [Bot] and 27 guests