Sublime text 3065 sidebar root directory - sublimetext

OK so if i want to create a new project i drag and drop a folder onto the sidebar, after which the contents show up in the sidebar.
My question is, is there any way to hide the root folder (as indicated)?
To clarify, I dont want to have to go inside the 'Wordpress' folder and add the substructure manually to create a project (ctrl+a , drag drop). I just want to be able to drag and drop the root directory (Wordpress in this case) and have it add all subfolders / files without it showing the root Wordpress Folder.
I just find it annoying for example, if i wanted to get into wp-admin the possibility of misclicking and collapsing the entire directory.

No, there is no way to do this. The base folder is the base folder, and is the container which holds all its files and subfolders. If you remove it, you have no way of identifying where the contents are located. If you want quick access to one of the subfolders, just add it to your project.
Additionally, with the latest releases of ST3, mis-clicking the wrong folder is no longer an issue, as Sublime remembers all the open subfolders, and the entire chain will be restored just like it was if you clicked again.

Related

How can I add a new folder in Sublime Text?

I'm in Sublime working on a project that I need to add a folder in; when I right click to try "Add Folder.." I type in name, press enter and nothing happens. It will still allow me to add a file no problem, but that's not what I need just yet.
You can add files and folders on the sidebar in Sublime Text. First, go to Project -> Add Folder to Project and select whatever your parent folder is. That'll put your parent folder in the sidebar. Then you can right click on any of the folders in the sidebar to create child files and folders.
I was having the same problems, not being able to create folders in the sidebar. Luckily, this method worked for me:
I typed in the name field the full path of one random file:
foldername-1/foldername/filename.php
The folders got created automatically.
I thought I had the same issue, but I've realised that when you click on create New Folder, appears a bar at the bottom asking you for the Folder Name. Once you give it a name, the folder will be added.
I may have the same problem with you.
When I press Enter, it actually gives me a newline.
I can't apply the rename/add folder action through sidebar.
This github issue may be related.

Xcode 5.0.1: How to make folders appear on top of files in the Project Navigator

I've just started using Xcode and discovered that folders are mixed with files of the same level alphabetically.
Is there a way to have folders displaying on top and then files of the same parent folder? Just like in TextMate's FileBrowser.
Current displaying is:
I want it to be:
Thanks in advance.
Changing the MacOS Finder preferences will cause XCode to also display folders before files at the same level.
Find and check the checkbox under Finder -> Preferences -> Advanced labelled Keep folders on top: In windows when sorting by name.
Restart XCode and you will find the new sort order is honored.
Just mouse-down on an item and move it. The file or folder level can also be changed this way. You can make folders from the menubar :File:New:Group".
I see that you are using folder references, not groups. If there is no specific reason to use folder references then change to use groups. When dragging in a folder of files there is the option of folder references or groups. Since folder references are a mirror of the directory structure and can not be changed in Xcode. I suspect the OP really wants groups.
When you are at the very bottom you can drag horizontally to select the level to move to. See added image.

How to create folder within project

I want to have all my image files in a folder so that I can obtain all of them at the same time. I think the path should like this ...MyApp.app/image folder/1.png.
But when I drag them into xcode with folder references created, there is no folder. The path is always MyApp.app/1.png.
Also, I think I've dragged the files into the app several times. How to delete the files? It's not enough to just delete the references.
If they are not visible in project navigator, that means that you have no references to them and you can delete them directly in finder.
You are likely to have moved every image to a group rather than a folder. A group is just a convenience in Xcode project navigator. It has nothing to do with file hierarchy.
To keep them in a folder, right-click project navigator. Select new folder, drag your files to that folder. When they are visible in your project navigator, make sure that they are all linked to your project. I.e they are all check market with your project in the right pane.
It important to drag them to the folder and not just outside of it.
Here's the easiest way to do this in Xcode:
1)
Put all your images into a folder and then drag that folder into the list of files in your Xcode project. That step looks like this:
2)
A sheet will drop down in Xcode and ask you how you want to add these files to your project. It looks like this:
There's a checkbox at the top there that says "Copy items into destination group's folder (if needed). You will check this if you want to copy your folder full of images into the same place where your source code is found in your Xcode project.
3)
When you're done adding, here is what your project should look like in Xcode. Notice that the folder color is blue. That means it's a folder reference. This folder will be copied into your built application.

Why can't I delete files from my XCode project?

This is probably a very easy question, but I'm having trouble deleting resources from my XCode project. I added them using "Create Folder References for any added folders" so that I could import a whole offline HTML site with its correct folder structure.
Unfortunately, now it has been added like this I don't seem to be able to delete individual files in the structure (it's not available from the Edit menu).
Can anyone help please? Thanks!
That isn't how folder references work. The idea is that its only a reference, you can open files within it and save it from those editors, you can delete or move the entire reference throughout the xcode project, but you can't actually edit it - its read only as far as xcode is concerned. Likewise, you cannot restructure it (move internal files around).
I'm not to sure why apple decided to make this the case, but apparently they have.
If you want to know how one might use the xcode folder system, here's how I tend to use them with my projects:
Whenever I subdivide code into folders, when I drag them into my project I click "recursively create groups for any added folders". If you do this, you any changes you make within xcode will not reflect the actual file itself. As far as I know, there is no way to do this. What does happen then is that when you add a new code file to it, the directory starts off in that file by default. ie, you don't need to navigate to it manually when you create a new file.
I use folder references whenever I'm working with content for an application I'm using. This way, I add all my images, folders, configuration files, whatever - and xcode immediately lists them. The reason I have it within xcode, I can I copy the files into the executables directory by dragging the folder reference into a "Copy Files" build phase.
Thats basically (to my knowledge) how one uses the folder types within xcode - sadly, I don't know how to achieve the functionality you want. You may have to manually delete the folders in finder, which if you do use folder references will update xcode to the change.
I ran into the same issue by using "Create Folder References for any added folders". I wanted to change some of the times but that's not possible. I had added a main folder that had other directories under it. I just had to select the main directory and deleted it and then just add the subdirectories that I needed. You can't make any location or removal changes to the directories that are added this way. -- Jeff
In the project browser, where you're looking at files, right click and choose "Delete". It'll prompt you to either remove the file from the project (leaving the underlying file on the filesystem) or to also move the underlying file to the trash.
I ran into the same issue. Delete the files from the folder directly as opposed to from within Xcode. You'll see the entries turn red under your project. Restarting Xcode should make these red entries vanish.

Xcode organization in finder?

I have read all the suggested StackOverflow posts on this question. It bothers me that Xcode will not organize my files in the finder the same way it does in the editor view...it will only do that if I copy files in from an external source and specifically tell it how I want things organized. Is there a way to make Xcode have the Finder respect the same organization as a default? I'd love to create a directory and then a file in that directory, and see the changes in both places.
I hate opening a project and seeing ALL my files in one place.
If you want your Groups structure in Xcode to mirror your Directories structure in the file system (which is also the Folders structure in the Finder), you have to take the following steps when adding files that you want to go into Groups/Subdirectories:
Create the folder in the Finder (or the directory from the command line)
Drag that folder into your Xcode project. Import it as a Group. Make sure its reference style is Relative to Enclosing Group, and that you drop it into the Group that represents its parent directory.
To add new files, select the Group and choose Add Files. The files will be stored in the directory that that Group represents, and they will be within that Group in the Xcode UI.
If your files are not yet under SCM control, one thing you can do is just delete them all from the Xcode project, rearrange them on disk however you want, then drag all the folders and files back in, making sure to not make copies, to create groups, and to set the reference style to Relative to Enclosing Group.

Resources