Reputation: 53873
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:
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!
Upvotes: 27
Views: 21740
Reputation: 16930
The correct answer is: it depends on:
What OS you are using. (MacOS, Win, Cygwin, Linux)
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.
Upvotes: 9
Reputation: 8296
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.
Upvotes: 26
Reputation: 34776
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
}
Upvotes: 4