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!
Anyone knows how vintage gf works?
sfranky
#1
0 Likes
sfranky
#3
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?
0 Likes
guillermooo
#4
gf is quite basic. I haven’t doublechecked, but I think it does the following:
[code]* 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
[/code]
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.)
0 Likes