Sublime Forum

ST3 for code and ST3 Portable for text on Win10

#1

Hi, i have installed ST3(Sublie Text 3) by default for editing code files. But also, i have a portable version of ST3 and I want to use it as default editor for .txt files. This two versions of ST3 has a different settings and packages. The idea behind this is for separate editing .txt in portable version and write code in ST3 installed version, i.e. open .txt in a separate ST3 Portable window, while default version of ST3 is running with my code stuff projects.

The main problem is that, in Windows i can’t to assign second portable version of already installed program to edit .txt files by default. It’s anyway opens with installed version of an editor, not with portable. Even if i try through context to “Open with:” and set a path to portable Sublime executable file, it opens with installed ST3 version, not with portable. Seems Windows recognize portable version of ST3 as an installed version, i.e. for OS it’s no difference beetwen installed and second portable version.

Well, not cool, but ok. I have add second portable version of ST3 in context menu, and try to open .txt files through context menu. Now i can open .txt files with portable ST3 even if my installed vertion of ST3 is already running.
But the second problem:
when default and portable ST3 is running, and i’m trying to edit file, it’s opens in a last opened ST3 window, i.e. if last opened ST3 window is ST3 Portable, and i’m try to adit .php file, it’s opens with Portable ST3 version, which is for plain text. But I need it to opens with default ST3 version, which is for code stuff.

Maybe it’s a strange way to use ST3 like that, earlier i was using Notepad++ for .txt files, and for other types of temporary records. But few days ago I had try to do it with portable version of ST3 and like this way more.

Is there is a way to edit different versions of files in defferent versions of ST3 ? Or maybe i do something wrong ?

0 Likes

#2

P.S. basically it’s possible to solve, if run portable ST3 in with administrator privileges. But as a result, my shortcut keys that assigned in another program doesn’t work from portable ST3 with administrator privileges. And who knows what else.

0 Likes

#3

Windows 10’s file assignments are horrible and buggy and a total mess of all the recent generations.

Especially the “Open With…” functionality does whatever …

Fortunatelly the old Win95 way of assigning extensions still works fine.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt]
@="sublime_text_portable"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\sublime_text_portable]
@="Sublime Text File"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\sublime_text_portable\shell\open\command]
@="\"C:\\Apps\\Sublime Text 3\\sublime_text.exe\" \"%1\""
0 Likes

#4

thanks, but seems there’s no way assign different types of files to default and portable versions of ST3, and open them separately in each version. this registry fix is working. But problem stays: when running portable and default ST3 at the same time, .txt files are opened in last opened instance of ST3. And it creates more inconvenience with messing files. So basicaly for .txt notepad++ stays:)) At least i’m able to store all my quick notes with ST3 portable, and run it with hotkey. but still not cool, running ST3 with admin privileges prevents me from using hotkeys assigned with another programs in this instance of Sublime. crap)

0 Likes

#5

Have you discovered Superlime?

Edit: Misunderstood the problem. Is this a thing where having a wildly different Syntax-Specific Settings file for Plain Text would let you use a single installation?

0 Likes

#6

Pretty sure this is nothing you’re doing wrong; Sublime just doesn’t spawn a new application instance every time you run it; instead when you try to launch it again, it talks to the running instance and tells it what to do; so no matter what executable you use to launch it (to some degree even if it’s not the same build), everything ends up running in the first instance.

1 Like

#7

no, i haven’t try Superlime, but as i understand it’s about admin privileges, not about second different instance of a program. And i need not just different Syntax-Specific Settings. The main purpose for the second portable instance is for holding my temporary qiuck notes, todo’s, readme’s and other stuff, which even don’t need to save, just holding few day, in editor tabs, and then closed, without any saves, in most cases. And also for opening this kind of files, or different .txt like files with this editor instance, for not to messing files with my main editor for code, which holding my working projects.
And this portable instance needs to run realy fast(almost like notepad++) and should run with separate hotkey, because my main sublime instance full of packages like LSP, CodeIntel, linters, e.t.c, that slow down the opening of the program(not too much, anyway it’s faster than VSCode even without plugins, but noticeably slower than my portable sublime instance). And basically portable ST3 instance always should hold just one project

0 Likes

#8

Yes, after a couple of hours of useless attempts i understand it. But i make some edits with .exe file, and now at least visually it looks like different editor:)

0 Likes

#9

Just related but actually brings nothing new. Everything has been already mentioned above.

  • File associations.
  • Add explorer context menu for a specific sublime_text.exe (or sublime_merge.exe).
  • Change executable icon.
1 Like

#10
1 Like