0

Can someone please tell me how I can setup Sublime Text 2 or 3 so that my F1 key on the keyboard opens up a file that on my system sits in:

C:/users/myname/projects/main/intranet/web.config

I have read this, and followed instructions on a blog post, but still cannot get it to work.

Here is what my bind looks like:

{ "keys": ["f1"], "command": "open_file", "args": {"file": "../../../../../../../users/myname/projects/main/intranet/web.config"} }

All the navigating back is because from what I can tell, Sublime starts from the Packages folder.

Is there a way I can tell it to always start navigating from C:\? I tried doing an absolute path like:

{ "keys": ["f1"], "command": "open_file", "args": {"file": "C:/users/myname/projects/main/intranet/web.config"} }

but I get the following path when I click F1 and of course a blank web.config

c:\users\myname\AppData\Roaming\Sublime Text 3\Packages\User\C:\users\myname\projects\main\intranet\web.config

Any help would be greatly appreciated.

Thank You.

  • 1
    Can't you just specify the absolute path? {"file": "C:/Users/myname/projects/main/intranet/web.config"}? – Xyon Jan 17 '14 at 11:58
  • Updated Q. I had tried that before, hence why I was asking about C:\ Thanks – J86 Jan 17 '14 at 12:33
  • 1
    Ok, what about using the *NIX-y convention and pretending C:\ is /? – Xyon Jan 17 '14 at 12:49
1

Figured it out, though it doesn't make sense to me :/

{ "keys": ["f1"], "command": "open_file", "args": {"file": "/c/users/myname/projects/main/intranet/web.config"} }

Xyon's final suggestion did not work, but helped me get the right answer.

Thanks

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.