Skip to content

Commit

Permalink
Cleanup setting-related things
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
rchl committed Mar 23, 2020
1 parent 3189d1d commit cb6639a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 73 deletions.
11 changes: 10 additions & 1 deletion Default.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@
{
"caption": "Trailing Spaces: Delete Trailing Spaces",
"command": "delete_trailing_spaces"
}
},
{
"caption": "Preferences: Trailing Spaces Settings",
"command": "edit_settings",
"args": {
"base_file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
"default": "// Settings in here override those in \"TrailingSpaces/trailing_spaces.sublime-settings\"\n\n{\n\t$0\n}\n",
},
},

]
67 changes: 5 additions & 62 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -42,78 +42,21 @@
"children":
[
{
"command": "open_file",
"command": "edit_settings",
"args": {
"file": "${packages}/TrailingSpaces/README.md",
"platform": "Windows"
"base_file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
"default": "// Settings in here override those in \"TrailingSpaces/trailing_spaces.sublime-settings\"\n\n{\n\t$0\n}\n",
},
"caption": "Help"
},
{
"command": "open_file",
"args": {
"file": "${packages}/TrailingSpaces/README.md",
"platform": "OSX"
},
"caption": "Help"
"caption": "Settings"
},
{ "caption": "-" },
{
"command": "open_file",
"args": {
"file": "${packages}/TrailingSpaces/README.md",
"platform": "Linux"
},
"caption": "Help"
},
{ "caption": "-" },
{
"command": "open_file",
"args": {
"file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
"platform": "Windows"
},
"caption": "Settings - Default"
},
{
"command": "open_file",
"args": {
"file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
"platform": "OSX"
},
"caption": "Settings - Default"
},
{
"command": "open_file",
"args": {
"file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings",
"platform": "Linux"
},
"caption": "Settings - Default"
},
{
"command": "open_file",
"args": {
"file": "${packages}/User/trailing_spaces.sublime-settings",
"platform": "Windows"
},
"caption": "Settings - User"
},
{
"command": "open_file",
"args": {
"file": "${packages}/User/trailing_spaces.sublime-settings",
"platform": "OSX"
},
"caption": "Settings - User"
},
{
"command": "open_file",
"args": {
"file": "${packages}/User/trailing_spaces.sublime-settings",
"platform": "Linux"
},
"caption": "Settings - User"
}
]
}
]
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Trailing Spaces
===============

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

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

Expand Down Expand Up @@ -115,9 +114,8 @@ Options

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

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

In order to enable this behavior, edit "Preferences / Settings - User"
In order to enable this behavior, edit "Preferences / Settings"
to add the following:

``` js
Expand Down
4 changes: 0 additions & 4 deletions trailing_spaces.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// Trailing Spaces' default settings.
//
// In order to tweak the settings, you should NOT edit this file, but instead
// the user-specific, empty-by-default version under "Preferences / Package
// Settings / Trailing Spaces / Settings - User".
//
// See Trailing Spaces' README for detailed instructions.
{
// By default, Trailing Spaces is "live". It means the trailing spaces
Expand Down

0 comments on commit cb6639a

Please sign in to comment.