Error when saving in Textmate - No parent folder for “filename” when saving existing file in existing folder - textmate

I open a folder in Textmate, and select a file for editing. When I go to save the edited file, it indicates there is no parent folder, and asks if I want to create it. If I copy the edits, close without saving, re-open the file, paste the edits, and save, it saves correctly.
It seems like this is time dependent. The folder is on the local machine.

You should try Reverting to Defaults.
Because link only answers are frowned upon, here's the contents of that document as though said by Yoda:
By reverting to default settings, many problems may be solved.
Remove these folders, after quitting TextMate, you must.
Lose customizations, you will.
~/Library/Application Support/TextMate
~/Library/Caches/com.macromates.TextMate/BundlesIndex.binary
~/Library/Preferences/com.macromates.TextMate.plist
~/.tm_properties

Related

Is there a way to transfer a VS project to another computer and keep all the same files open?

I frequently take projects between work and home on a flash drive. I zip up the project with 7zip, take it to the new computer, delete the old project, and extract the newer version. But after doing this the solution doesn't open the files I had open previously like it normally does when re-opening a solution without replacing it with a new version.
The 7z file does include the hidden .vs folder which I believe is where the list of open files is supposed to be saved.
My Task Canvas extension automatically saves open files on solution closing and restores them when you reopen the solution. It works with relative paths and information is saved to a .TaskCanvasSL file in the solution directory.
(But this is just one feature and doesn't justify purchase if you don't need the whole code fragments and tasks concept.)

How do I save and load all files in a sublime text session as a 'project'?

I've read that you can save a ' project ' but apparently I'm doing it wrong.
What I've done is...
Create a js, html and css file and use view/layout with 3 columns so
each file has its own section of the layout.
I then went to Project / save project as / and saved the respective file in
a directory
I assumed that all files should be saved in this directory along with a file that I can click that loads them all up to reflect the workflow.
Apparently sublime has a different idea of how this should work and I do not understand it.
Essentially, there are two parts to a Sublime project - a .sublime-project file, and a .sublime-workspace file. Please see both the "unofficial" docs and the official website for information regarding projects, and the setup of .sublime-project files. These files are JSON-formatted and contain paths to any folders contained in your project, project-specific settings, and project-specific build systems. This file can (and should) be edited to customize the project to your needs. Double-clicking this file (after associating its file type with Sublime, following the procedure of your operating system) will open the project, any open files within it, and any folders you've added to it (by selecting Project -> Add Folder to Project).
The .sublime-workspace file is also JSON-formatted, but is saved automatically by Sublime and shouldn't be edited unless you really know what you're doing, and even then you probably shouldn't edit it. It contains all sorts of meta information about the project's history in Sublime, which files were open and in what order/pane, previous contents of searches, find/replace, etc., your file history, settings for various plugins like SublimeCodeIntel, and lots more. By default it is hidden when viewing the contents of folders in the Side Bar, and when double-clicked it will try to open the project instead of opening for viewing/editing, so there are several measures in place to prevent your playing with it and potentially screwing up Sublime.
.sublime-project files can be saved wherever you want, but the folders and files contained within it are not necessarily saved in the same place - they stay wherever they were saved. It usually makes sense to save them in the project's root directory, so if you have a filesystem like myhomedir/projects/web/SweetWebsite/ containing html/, js/, and css/ subdirectories, you might want to save your project as .../SweetWebsite/SweetWebsite.sublime-project, just so you know at a glance what files/folders are probably in it. However, you could save SweetWebsite.sublime-project in myhomedir/Desktop for all Sublime cares, and it would work exactly the same way. While it is possible to have unsaved files in a project, of course it's always best to save your work early and often, so you don't lose anything.
Hopefully this helps, please let me know if you have further questions.

I want to rename profile folder

When I rename a profile, it just changes the Name property in Profiles.ini. So I wanted to rename the profile folder to match. If I rename profile directory, and update the path in Profiles.ini file will it be ok? O
Your question is a bit vague/incomprehensible...
But yes, IIRC renaming the folder and updating Profiles.ini accordingly should be sufficient, at least as far as it concerns the mozilla-powered application in question.
However, you can never be sure about some third-party software, such as add-ons, having hardcoded the old path somewhere else. Because of that I wouldn't recommend renaming the profile folder unless absolutely necessary for some reason.
Renaming a profile while it is running is not possible because there will be some open and locked files. Also, Firefox might cache some absolute paths at runtime besides that.
To repeat...
Not running: safe to rename for Firefox (or at least that is the goal), but not necessarily third-party stuff.
Running: Never safe to rename. –
I tried renaming a profile folder of Firefox but addon icons failed to appear next to the browsing bar afterwards (some addon icons like uBlock Origin are hardcoded with the original profile name).
Thunderbird has a similar problem, I lost all open tabs after changing the profile folder name but there may be other issues as well.
In both cases, I updated the profile name in all locations where it appeared in profile files profiles.ini and installs.ini.
I tried going back to the previous folder name but the result was still messed up so I created new profiles (they were new anyway).
So if someone wants to try, I recommend using a test profile first and keep a backup of the original folder.

copying files into Xcode

I have a project with quite a few png files. I'm not sure how it happens, but every once in a while, the "copy items to destination group folder(if needed)" checkbox becomes unchecked, and I will add quite a few files without realizing they aren't being copied. I was wondering if there was a way within Xcode to copy those files into the project. I don't want to re-add them all, because there are tons of them. I'd prefer if I could just mass select the files in that left panel within Xcode and press a button, and have it be done.
Not sure if there's a better option, but you can always edit the pxbproj file in a text editor (right click the xcodeproj file, show package contents to find it).
Look for values like this:
path = "../../../Desktop/Foobar.png";
And change to:
path = "Artwork/foobar.png"
Do this while Xcode is closed (or at least the project is closed) and make sure you commit the entire project to git before making any edits, so you can roll back if something goes wrong.

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.

Resources