gf is quite basic. I haven't doublechecked, but I think it does the following:
* if the selection is not empty
* if selected text is the path to an existing file; open it
* 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.)