I had to update the batch file like this: ECHO OFF SET WORKINGDIRCD cd /d dp0 SET EXECDIRCD cd WORKINGDIR START 'Sublime text editor' 'EXECDIR\sublimetext\sublimetext. So what happened to me is I cd into a new Rails project folder and wanted to open just the current project folder in Sublime Text 2 and it was not happening.ĭisable auto load sessions/last file(s): Open sublime text 2 and Go to, Preferences/Settings-User.Īdd these two lines: (if curly braces are present just add a comma to the end of last item in the list and the enter text into existing braces. 1 I finally was able to solve that problem. Paste the following code into the Mac OS X Terminal, assuming that youve installed Sublime Text 2 into the. Once weve included that, we can press esc to exit insert mode and then :wq to save and exit. So we can add our alias there now, like this: alias sublC:/Program Files/Sublime Text 3/sublimetext.exe. I wonder why It seems that in open() in one case the default encoding is utf-8, but not in the other case. Now you have access and can type into the prompt. I have a very simple script which just reads in a file, that somehow does now work when I run it from inside Sublime Text, but works fine when I invoke Python from the command line. Option -a is suitable for MacOS applications, then. If no application name is specified, the default application as determined via LaunchServices is used to open the specified files. " it will open two windows the last session, and the current folder hierarchy in another window. How to open Sublime Text from the command line. Then you need to press i to enter the insert mode. The open command opens a file (or a directory or URL), just as if you had double-clicked the files icon. If I open the project by opening this file in the Sublime Text UI, Sublime respects the exclusion rules in the file. So what happens is when you create the symbolic link so you can type "subl" in the terminal window Sublime Text 2 will open the last session. I have a project with a myproject.sublime-project file. In some cases that is a good feature but for me and it seems as you as well it is not. Sublime remembers the last session and files that were opened after you exit the program by default. You can write Python code with any text editor of your choice and run it from the command line using the python command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |