Skip to content

Commit cb6639a

Browse files
committed
Cleanup setting-related things
- Add palette command to open settings - Use `edit_settings` command to show settings in two-pane view - Remove mention of Sublime Text 2 from readme
1 parent 3189d1d commit cb6639a

File tree

4 files changed

+19
-73
lines changed

4 files changed

+19
-73
lines changed

Default.sublime-commands

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,14 @@
66
{
77
"caption": "Trailing Spaces: Delete Trailing Spaces",
88
"command": "delete_trailing_spaces"
9-
}
9+
},
10+
{
11+
"caption": "Preferences: Trailing Spaces Settings",
12+
"command": "edit_settings",
13+
"args": {
14+
"base_file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
15+
"default": "// Settings in here override those in \"TrailingSpaces/trailing_spaces.sublime-settings\"\n\n{\n\t$0\n}\n",
16+
},
17+
},
18+
1019
]

Main.sublime-menu

Lines changed: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -42,78 +42,21 @@
4242
"children":
4343
[
4444
{
45-
"command": "open_file",
45+
"command": "edit_settings",
4646
"args": {
47-
"file": "${packages}/TrailingSpaces/README.md",
48-
"platform": "Windows"
47+
"base_file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
48+
"default": "// Settings in here override those in \"TrailingSpaces/trailing_spaces.sublime-settings\"\n\n{\n\t$0\n}\n",
4949
},
50-
"caption": "Help"
51-
},
52-
{
53-
"command": "open_file",
54-
"args": {
55-
"file": "${packages}/TrailingSpaces/README.md",
56-
"platform": "OSX"
57-
},
58-
"caption": "Help"
50+
"caption": "Settings"
5951
},
52+
{ "caption": "-" },
6053
{
6154
"command": "open_file",
6255
"args": {
6356
"file": "${packages}/TrailingSpaces/README.md",
64-
"platform": "Linux"
6557
},
6658
"caption": "Help"
6759
},
68-
{ "caption": "-" },
69-
{
70-
"command": "open_file",
71-
"args": {
72-
"file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
73-
"platform": "Windows"
74-
},
75-
"caption": "Settings - Default"
76-
},
77-
{
78-
"command": "open_file",
79-
"args": {
80-
"file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
81-
"platform": "OSX"
82-
},
83-
"caption": "Settings - Default"
84-
},
85-
{
86-
"command": "open_file",
87-
"args": {
88-
"file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
89-
"platform": "Linux"
90-
},
91-
"caption": "Settings - Default"
92-
},
93-
{
94-
"command": "open_file",
95-
"args": {
96-
"file": "${packages}/User/trailing_spaces.sublime-settings",
97-
"platform": "Windows"
98-
},
99-
"caption": "Settings - User"
100-
},
101-
{
102-
"command": "open_file",
103-
"args": {
104-
"file": "${packages}/User/trailing_spaces.sublime-settings",
105-
"platform": "OSX"
106-
},
107-
"caption": "Settings - User"
108-
},
109-
{
110-
"command": "open_file",
111-
"args": {
112-
"file": "${packages}/User/trailing_spaces.sublime-settings",
113-
"platform": "Linux"
114-
},
115-
"caption": "Settings - User"
116-
}
11760
]
11861
}
11962
]

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
Trailing Spaces
22
===============
33

4-
A [Sublime Text 2](http://www.sublimetext.com/2) and
5-
[3](http://www.sublimetext.com/3) plugin that allows you to…
4+
A [Sublime Text](http://www.sublimetext.com) plugin that allows you to…
65

76
**highlight trailing spaces and delete them in a flash!**
87

@@ -115,9 +114,8 @@ Options
115114

116115
Several options are available to customize the plugin's behavior. Those
117116
settings are stored in a configuration file, as JSON. You must use a specific
118-
file: Go to "Preferences / Package Settings / Trailing Spaces / Settings
119-
\- User" to add you custom settings. You can look at the default values in
120-
"Settings - Default", in the same menu.
117+
file: Go to "Preferences / Package Settings / Trailing Spaces / Settings" to
118+
add you custom settings.
121119

122120
A few of them are also accessible through the "Edit / Trailing Spaces" menu.
123121
Sometimes, editing a setting will require a fresh Sublime Text to be applied
@@ -322,7 +320,7 @@ Trailing Spaces is designed to be a drop-in replacement of the limited
322320
*Trim Whitespace On Save* built-in feature. ST is indeed able to delete
323321
trailing spaces upon saving files, and maybe that's all you need!
324322

325-
In order to enable this behavior, edit "Preferences / Settings - User"
323+
In order to enable this behavior, edit "Preferences / Settings"
326324
to add the following:
327325

328326
``` js

trailing_spaces.sublime-settings

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// Trailing Spaces' default settings.
22
//
3-
// In order to tweak the settings, you should NOT edit this file, but instead
4-
// the user-specific, empty-by-default version under "Preferences / Package
5-
// Settings / Trailing Spaces / Settings - User".
6-
//
73
// See Trailing Spaces' README for detailed instructions.
84
{
95
// By default, Trailing Spaces is "live". It means the trailing spaces

0 commit comments

Comments
 (0)