sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
809 stars 39 forks source link

Support absolute pathes within project in Goto Anything #4020

Open themilkman opened 3 years ago

themilkman commented 3 years ago

Problem description

Usecase: I have a stack trace on my local machine on the console and want to copy/paste it into Goto Anything panel in ST in order to check the file.

When I paste it (let's say '/home/myhome/dev/project_x/app/controllers/v1/something_controller.rb') in the Ctrl+p panel ST doesn't find it (although here my currently opened ST project dir is '/home/myhome/dev/project_x/'). I have to remove the preceding path until the app/<..> part to get a file suggestion.

Preferred solution

If sublime detects that the start of the path matches the project root path(es), strip it internally away an search the file-path within the project.

themilkman commented 3 years ago

Also paths starting with ./ from the root directory would be useful( like ./spec/controllers/my_super_spec.rb:88) to "jump" to the file from console outputs.