Jump to included file does not work for relative path
feekApp opened this issue · 4 comments
Hi,
When pressing CMD-SHIFT-D (Jump to Included File), only files with an absolute path to the file are recognized.
// active file in ~/Desktop/Test
// does not work:
include 'untitled.php';
// does work:
include '/Users/UserName/Desktop/Test/untitled.php';Tooltip error: file not found.
Also when pressing ESC when the CMD-SHIFT-D pop-up tooltip is active, the following error occurs:
Failure running "Jump to include File"
Command return status code 1
I'am using TM 2.0 beta 8.6 and OSX 10.11.3n (also happens with TM beta 8.5)
regards,
Feek
Hi,
solved it!
Added the current working directory (Environment Variable: TM_DIRECTORY) to PHP_INCLUDE_PATH variable in my main .tm_properties file (note the closing /):
# Add PHP Completion support
PHP_INCLUDE_PATH = /usr/bin/php:$TM_DIRECTORY/
regards,
Feek
This was actually a regression due to a change in how TextMate runs commands. I've pushed a change to correct the issue without needing to set the variable. Thanks for pointing this out. :)
Hi Infininight,
Thnx for fixing the path-issue.
Sorry I was to I was too quick closing this issue :(
The issue regarding pressing ESC when the CMD-SHIFT-D pop-up tooltip is active for selecting a file, still persists. The following error code is showing:
Failure running "Jump to include File"
Command return status code 1
regards,
feek
Additional to the above:
paths = []
if ENV['PHP_INCLUDE_PATH']
paths = ENV['PHP_INCLUDE_PATH'].split(':')
else
paths = [ENV['TM_DIRECTORY']]
end
you have to add the TM_DIRECTORY also to the path if the I statement is true! When the PHP_INCLUDE_PATH is set (needed cf. the plugin help), now no search is done in the current folder.
regards,
feek