Where is Preferences.sublime-settings? [duplicate] - macos

This question already has an answer here:
Sublime Text settings on Mac
(1 answer)
Closed 6 years ago.
I went into Finder, hit Command-F and searched my Mac for Preferences.sublime-settings but did not find it. It found a file I had saved in a non-used folder but did not pull up the actual file that I thought sublime would use. Where is it?
I ended up copy pasting the contents of the folder it did find into the sublime application manually. But I would have preferred to use a hard link to the file.
This is json/javascript file but from the extension you would not know this.
Update - Here is where we think it should be:

Use:
chflags nohidden ~/Library
and you will be able to browse Library in your home directory. You should find the file here:
~/Library/Application Support/Sublime Text 2/Users
Also, you can access this file directly from the Sublime Menu.

Related

How to create a .gitignore file in Windows 10 [duplicate]

This question already has answers here:
How do I manually create a file with a . (dot) prefix in Windows? For example, .htaccess
(17 answers)
Closed 3 years ago.
I tried to create a .gitignore file in my repository's root directory with the command
$ touch .gitginore
in Git Bash.
But when I looked at the file from the Windows Explorer. It says it's a text document. Isn't it supposed to be of the type File?
touch .gitignore works just fine. Windows detects it as a text file but git should works perfectly.
To be sure of it, you can type ls -la and you should see all your files with their extensions, including .gitignore just like in the following picture:
Since the question does not specify any required tools, this contains a solution if you want to create a .gitignore file using command prompt or Windows Explorer.
Command Prompt:
In case one receives the following error message on a Windows 10 system in command prompt because touch is a command of git bash:
'touch' is not recognized as an internal or external command, operable
program or batch file.
You can either use the following command in command prompt (cmd):
echo. > .gitignore
or
type nul > .gitignore
as indicated here: Windows equivalent of 'touch' (i.e. the node.js way to create an index.html). This procedure will not generate a Text Document as indicated in the problem statement, but a file that appears to not have any extension.
Windows Explorer:
If you try to do it in Windows 10 Explorer by clicking right mouse button(RMB)>New>Text Document and you try to name it .gitignore you can receive the following error:
You must type a file name.
This can be overcome by giving it the filename .gitignore.. So if your git repository folder contains a folder named output which you want to suppress/not sync, you can add it to the .gitignore by editing the .gitignore. file with a text editor and adding a line that contains /output. This last procedure generates a file which is also a .txt document as indicated in the problem statement, but as mentioned by #hobbs and #Youkool that is not a problem for git. Furthermore, the last procedure is verified in Windows 10 with git version 2.16.1.windows.4.
but when I looked at the file from the windows explorer. It says it's a text document. Isn't it supposed to be of the type File
Windows says your README is of type File because it has no extension. In contrast, your .gitignore file has the extension .gitignore which Windows has been configured to report (probably by the git-for-windows installer) the type Text Document.
Please refer to How do I manually create a file with a . (dot) prefix in Windows? For example, .htaccess.
Reproducing for your easy access: In File Explorer, right click anywhere and create a new file. Type the new filename as .something. (notice the appended period) and press Enter twice, job done.

I cannot find Haml.tmLanguage on Sublime Text 3

I'm using sublime text 3.
When I make scss file, that is named to filename.scss.haml Automatically.
This issue easily solving this link(http://tosbourn.com/sublime-text-reading-sass-files-as-haml/)
but I cannot find "/Library/Application Support/Sublime Text 2/Packages/Rails/Ruby Haml.tmLanguage." files and .../Packages/Rails Directory is not exists...
How can I fix that problem...
I'm using sublime text 3.
http://tosbourn.com/sublime-text-reading-sass-files-as-haml/ says look in:
/Library/Application Support/Sublime Text 2/Packages/Rails/Ruby Haml.tmLanguage.
Wrong version, so I guess the fix to your problem would be use ST2 maybe? Or find a more updated reference.
Open a sass file
View > syntax > open all with current extension as... > SASS

How to stop ".DS_store" file creation why its create [duplicate]

This question already has answers here:
How to stop creating .DS_Store on Mac? [closed]
(8 answers)
Closed 8 years ago.
In my computer each folder has .DS_store file. If I delete it after several days its automatically creates .DS_store file. How do I stop it.
Open Terminal.
Execute this command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Either restart the computer or log out and back in to the user account.
for more informations:
https://support.apple.com/en-us/HT208209
I don't believe you can- DS_Store is generated every time a folder is accessed in the Finder. So, if you really don't want it (or need to get rid of it for an archive or something similar), delete it using the command prompt and don't access the folder again with the Finder.

Make the user package point to somewhere else with sublime text

I'm using Sublime text, and I'm sharing some snippets with coworkers. I would like to be abble to directly make sublime text go to this folder to find the snippets.
Do you know any good ways of doing it ?
create a share folder with your team (say /mnt/shared/snippets)
symlink that folder to your Sublime folder
ln -s /mnt/shared/snippets "~/Library/Application Support/Sublime Text 3/User/"
restart Sublime and it should pick up the snippets

How to stop Sublime Text 2 crashing on startup

I've got a problem with Sublime Text 2 in that when I start it it automatically tries to load a file that leads it to crash.
I can see that there are ways of changing the settings once it's loaded - how do I fix it when it won't finish start-up?
I'm running on Mac OSX (Mavericks).
For Sublime 3
on Mac, Auto Save session exists in this path
~/Library/Application Support/Sublime Text 3/Local. Just go to this path delete all the files. Sublime will start working fresh.
On Linux, Auto Save session exists in /home/<USER>/.config/sublime-text-3/Local. Delete all the files you'll be good to go fresh.
On Windows the path is %APPDATA%\Sublime Text 3\Local
You can try hunting around for the file causing the error. However, I'd recommend reverting your install (link) though rather than deleting, I'd just move it somewhere temporarily. Be sure to move your User folder out. After reverting, move the User folder back. If you used package control, it will grab all of the installed plugins again. If you didn't you will need to move those back manually. If it's a particular file that's causing issues (not a plugin) then you could also edit the Session file. It's a bit more involved but can be found in Application Support/Sublime Text 2/Settings.
If you could post the file causing the issue, we could probably tell you how to fix put it back into a working state. If it's a settings file, it might be as simple as malformed json. I'm unsure though as you didn't give much detail on the actual error.
So, I deleted both the Session.sublime_session and the Auto Save Session.sublime_session in the Settings folder and that allowed me to get it to run and not crash on startup.
Delete Session.sublime_session from ~/Library/Application Support/Sublime Text 3/Local.
rm ~/Library/Application\ Support/Sublime\ Text\ 3/Local/Session.sublime_session
Also:
Please don't delete all content in the ~/Library/Application Support/Sublime Text 3/Local folder as this will also delete your Licence. #kushdilip (Tried to add this as a comment to your post but didn't have enough reputation to do so.)
I would recommend using another text editor (such as using vim in the terminal) to view/edit the files in:
~/Library/Application Support/Sublime Text 2/Packages/Default/Preferences.sublime-settings
There are two other directories, but Default is probably where you want to start.
~/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings
~/Library/Application Support/Sublime Text 2/Packages/Vintage/Preferences.sublime-settings
(Make a backup before changing any files around!)
For subline text 2 on my Mac:
There is no directory named Local under ~/Library/Application Support/Sublime Text 2/, but there is strange hidden file .DS_Store, I remove it and sublime text don't crash anymore!
$ rm .DS_Store

Resources