How can I configure sublime to always open to the same folder? - json

I have a folder that I want Sublime to always open to ...
my_folder
Is there somewhere I can set this so that when ever I click on the Sublime Icon it opens to this folder?
For some reason if I manually quit sublime text through the menu it will open my last folder on re-opening.
However, if I just click the close X button, it will not ... it will open a blank window.
Is there somewhere I can set this correctly in the JSON file?

Well not sure if you are aware of it, but ST has a quick switch project (usually ctrl+alt+p) that will show you your recently opened projects.
Of course it has its own drawbacks:
Unable to remove one instance from it without removing all (clear recent projects cache)Can’t open the project in a new window… instead it only replaces the current project
But AFAIK this would be the most optimal way to work with multiple projects. you just need to go to the folder of the desired project and open it once and it will be available as recent project in the future…
The point of having to choose where to save the project file, IMO is because you may want to share the same file with other people or just have them wherever you want… maybe having all in one place is good for you (it is for me as well) but other people might like to have it in separate folders. 
I usually work with the project replace window… or just go in “Project -> Open recent -> …” which opens a new ST window for me!
Hope this helps you

Related

PhpStorm navigate to -> file search only for Twig files

I have strange problem connecting with PhpStorm IDE. I use version 2016.3.2 Build #PS-163.10504.2.
I love using Ctrl + Shift + N for searching files which I need to override. I have 2 project (one new, one old) and in old file searching works fine and in new search only for twig files and nothing else.
Is there any configuration I need to change?
Check filter -- the blue Funnel icon on the right top corner of that popup -- you may have selected to list files of certain types only.
Otherwise -- try universal File | Invalidate Caches... and restart IDE -- it usually helps in such "suddenly stop working" situations.

PhpStorm multiple project navigation, quick switch between projects

How can I open few projects in left work area in PhpStorm? I need to quick switch between projects.
If you want to open more than one project in this way (and by this I mean so they have their own different settings), then currently it is not possible.
http://youtrack.jetbrains.com/issue/WI-15187 -- vote/star/comment to get notified on progress.
If you need to include files from those projects for reference purposes (to see how you have done it there, to copy some code from there etc) -- you can include them under "External Libraries" -- Settings | PHP | Include paths. Files included this way are protected from modifications.
If you need to modify those files ... you can add them into actual project as Additional Content Root (Settings | Directories| Add Content Root) -- such folders will be treated as part of the actual project with no separate settings.
Other than that -- Alt + Tab (or whatever the shortcut is on your OS) to switch between different PhpStorm windows (each project is opened in separate window/frame).
This is a right on time answer.
It is possible to quick switch between project by adding a keyboard shortcut to the "manage project" menu.
To do just that, go to Settings > Keymap and search for "Manage Projects". Then add it the keyboard shortcut you desire and you're all set.
Hope this will help someone looking for an answer like I did.
As LazyOne said, you can add paths to your project from Setting | PHP | Include paths or from the useful keystroke F4.
But I'd like to also share how I organise my projects, I think when you create a project, you should not open a new window but instead open it in the same window.
This way you don't get confused between the different opened windows.
In settings you can assign a keystroke to Reopen recent projects. I then use ctrl + shift + R but it is up for you to chose the keystroke you like.
Hope this will help you as I struggled as well to find a way to manage all my current projects.

Saving sublime text snippets in a directory for reuse on different pc

Hey guys i am new to Sublime. I read in documentation how to create snippets. Now my question is how to save them in to a directory and then maybe reuse them on another PC.
Thanks.
You should save snippets in your Packages/User directory, where Packages is the directory opened by selecting Preferences -> Browse Packages.... You can then copy the .sublime-snippet files to your other PC by whatever means you prefer.
Save the file. When you do, you'll need to determine two things: its file name & where to save it.
File name: The file must end with .sublime-snippet, like this: foo.sublime-snippet. What goes in front of .sublime-snippet is up to you. I like to use the tabTrigger if at all possible, along with the main part of the scope in front of the tabTrigger, giving me this: html-p.sublime-snippet.
Where to save it: When you press Save, Sublime Text should automatically try to save the file in the right folder.
You shouldn't have to worry about the location, as Sublime Text should take care of it for you, but if for some weird reason you're not in the right place, then you'll need to navigate to the right location.

Go to file when file already open in other panes/windows open in Sublime 2

If I have several panes (groups) open and do CTRL+P (go to anything) and type the name of a file which is already open in another pane, Sublime will open this file in the pane I started Go to anything from. I want it to go to any of the other panes, where this file is already opened instead of opening a new instance of the file.
How can I achieve this?
There are a couple of packages/plugins that may be close to what you want:
GotoOpenFile, you can choose from a list of views in whole window or the active group:
https://sublime.wbond.net/packages/GotoOpenFile
or the newer Zen Tabs, which has some other useful file status as well as tab management
https://sublime.wbond.net/packages/Zen%20Tabs

After moving my Windows Store App project I can't compile it because .resw not found

I have a Problem with a Windows Store App.
I moved the folder and now I cant compile it, I get the error:
Fehler 2 File C:\[old path]\Strings\en-US\Resources.resw not found. C:\[new path]\MakePRI
I dont know how to fix it because the app is in the same relative path in the project as before.
any hints for a solution?
This item was probably added to the project with absolute path. You can fix that in one of two ways:
In SolutionExplorer remove Resources.resw from the project. Then click on Show All Files icon to make the file appear in its folder although it's not included in the project (I understand you did copy it over when moving the project). Now right click on the file and select Include In Project. After that you can again turn off Show All Files.
In Solution Explorer right click on the project and select Unload Project. Now right click on the project again and select Edit ProjectName.csproj. In the file find Resources.resw and replace the existing tag (and any subtags) with <PRIResource Include="Strings\en-US\Resources.resw" />. Save the changes and close the file. Right click on the project again and select Reload Project.
I got into this problem and I found an easy solution. Open the project and it will show the error. Now right click on the App name in Solution Explorer (on the right hand side) and select Build.This will set the path again and the project can be run now.