Sublime Forum

Explorer context menu not opening hidden files

#1

I’m a new sublime user so I apologize if this is just a setting somewhere, but…
Sublime Text won’t open a file that starts with a period ‘.’ as a command line parameter.
(In this case, I’m trying to open “.tfignore”)
Either from explorers “open with sublime text” context menu,
or from a DOS prompt (typing: “sublime_text.exe .tfignore”), nothing happens.
I can open it from the file->open dialog.
If this is a bug, please consider fixing it for the next release.

0 Likes

#2

It seems to work just fine for me (Windows 7, x64). As far as I know there’s no setting for controlling that sort of thing. In my case I’m opening .gitignore but that shouldn’t matter (if I try to open .tfignore instead, I get a tab for that file so I can create the contents).

You don’t mention passing -n to open a new window, so if there is already a sublime window open somewhere the file will open in it instead. That’s probably very noticeable however.

1 Like

#3

Well this is weird:
Now it’s working as expected from the command prompt… (but still not from explorer)
from explorer:
If there is a window open, it stays open with the file(s) it had open before.
If it’s not open, it doesn’t come up.
I’m on Win10x64 if that makes a difference.
Since it works for you, then it’s not somehow coded to exclude them.
Since it somehow partially fixed itself, I’m not sure that a reboot wouldn’t fix it. There may be something in a half-baked state somewhere…
Thanks for the reply!

0 Likes

#4

I am also using Win10 x64 with Sublime X86 and I do not remember about getting issues as this.
I just tested, currently I may open files as .whatever from the explorer, form the cmd and from the mintty cygwin’s terminal.

Try to delete all your windows registry keys related to Sublime-Text and re-creating them.

I am using this windows registry to open sublime text on the explorer. Change the path to yours Sublime Text Path:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell]

[HKEY_CLASSES_ROOT\*\shell\Edit with Sublime]
"icon"="D:\\User\\Dropbox\\Applications\\SoftwareVersioning\\SublimeText\\sublime_text.exe,0"

[HKEY_CLASSES_ROOT\*\shell\Edit with Sublime\command]
@="\"D:\\User\\Dropbox\\Applications\\SoftwareVersioning\\SublimeText\\sublime_text.exe\" -n \"%1\""
0 Likes

#5

After updating the registry, the icon shows up now.
I think I may have identified the issue:

I think I at one point tried to open a locked .tfignore and it ‘remembered’ that that particular filename was locked no matter which instance on my disk I was trying to open.

I’m not positive that’s what the underlying cause was, because the file that I assumed had the lock now opens up fine (and I didn’t close the program that would have had the lock - so either sublime broke the lock, or it was something else entirely.)

It could also be something with the OS - as it’s been flaky since I installed it a few weeks ago.

Thanks for the help. Whatever the cause was, now it’s working from the command prompt and explorer.

2 Likes