Where is my Sublime Preferences file?

17,276

Solution 1

The file you were looking for is actually very close

~/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings

that's indeed the file shown through the menu. I agree its location isn't as intuitive as it could be.

Solution 2

The correct answer is: it depends on:

  1. What OS you are using. (MacOS, Win, Cygwin, Linux)

  2. How you installed it. (By default installer or as a stand-alone.)

Here's the default (installer) list:

MacOS:   ~/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings
Linux:   ~/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings
Windows: C:\Users\<username>\AppData\Roaming\Sublime Text 3\Packages\User\Preferences.sublime-settings

For a stand-alone installation, it will be in:
<install path>/Data/Packages/User/Preferences.sublime-settings.

The settings files are consulted in this order:

    Packages/Default/Preferences.sublime-settings
    Packages/Default/Preferences (<platform>).sublime-settings
    Packages/User/Preferences.sublime-settings
    <Project Settings>
    Packages/<syntax>/<syntax>.sublime-settings
    Packages/User/<syntax>.sublime-settings
    <Buffer Specific Settings>

So generally you should place your settings in:
.../Packages/User/Preferences.sublime-settings.


PS. Yes, I know OP asked for MacOS, but everyone else will also end up on this page.

Solution 3

You must open Settings - User instead of Settings - Default. Settings - Default contains default settings and it should not be editable.

So just go to Preferences/Settings - User and add following content to disable word wrap:

{
    "word_wrap": false
}
Share:
17,276

Related videos on Youtube

kramer65
Author by

kramer65

Updated on July 01, 2022

Comments

  • kramer65
    kramer65 almost 2 years

    I'm using the excellent Sublime Text 3 editor on my Mac for which I want to turn off word wrap. So I went to Preferences > Settings - Default, which opens up a settings file. Unfortunately I am unable to edit the file, so I wanted to lookup the file on the command line. I hovered over the file in Sublime, which shows me the location of the file:

    enter image description here

    I then tried to go to that folder, but to my surprise there is no Default folder in the ~/Library/Application Support/Sublime Text 3/Packages/ folder:

     $ ls -la ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
    total 280
    drwx------   7 kramer65  staff     238 17 okt 13:48 .
    drwx------   8 kramer65  staff     272  8 okt 16:23 ..
    -rw-r--r--@  1 kramer65  staff    6148  8 okt 16:25 .DS_Store
    drwxr-xr-x@ 18 kramer65  staff     612 14 jul 01:49 Jedi - Python autocompletion
    -rw-r--r--@  1 kramer65  staff  132375 17 okt 13:45 Package Control.sublime-package
    drwxr-xr-x  24 kramer65  staff     816 17 okt 13:48 SublimeCodeIntel
    drwx------   7 kramer65  staff     238 17 okt 13:48 User
    

    and here I'm stuck. How can it be that I am looking at a file, which doesn't seem to exist?

    Does anybody know what I'm doing wrong here? How can I find this file to disable the wordwrapping? All tips are welcome!

  • kramer65
    kramer65 over 9 years
    Although I still don't get why the file doesn't exist, this is indeed a solution to my problem. Thanks! :)
  • Taylor D. Edmiston
    Taylor D. Edmiston about 3 years
    For anyone on the new Sublime Text 4, it seems like something has changed here as the Default package no longer exists on the filesystem. It seems they are doing some voodoo magic in ST4 to make the default preferences doc appear to still exist at this path, but I'm not yet able to locate the platform-specific preferences docs.
  • not2qubit
    not2qubit about 3 years
    @TaylorEdmiston Thanks for update. Unfortunately I'm still a happy ST3 user, so I have not had a chance to look at ST4 yet. So if someone finds a solution let me know, and I'll add an update to this answer. Another thought is that since Default is not supposed to be touched, perhaps they have hardcoded it? It may help to search your drive for the files. Perhaps using find under WSL or Cygwin, which are good at finding files usually hidden by the OS.