From dd4398b4f21708b7d881abd823bcc9687019076a Mon Sep 17 00:00:00 2001 From: deathaxe Date: Thu, 28 Dec 2023 12:06:28 +0100 Subject: [PATCH] Use existing default commands to handle settings --- Default.sublime-commands | 6 +++++- Main.sublime-menu | 8 ++++++-- atomic_soft_tab_nav.py | 14 -------------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Default.sublime-commands b/Default.sublime-commands index 64eb8a2..d44b5c2 100644 --- a/Default.sublime-commands +++ b/Default.sublime-commands @@ -15,6 +15,10 @@ }, { "caption": "Preferences: Atomic Soft Tab Nav Settings", - "command": "atomic_soft_tab_nav_edit_settings" + "command": "edit_settings", + "args": { + "base_file": "${packages}/Atomic Soft Tab Nav/Atomic Soft Tab Nav.sublime-settings", + "default": "// See the left pane for the list of settings and valid values\n{\n\t\"enable_line_nav\": ${0:false}\n}\n" + } } ] \ No newline at end of file diff --git a/Main.sublime-menu b/Main.sublime-menu index 7f44c28..d27b04c 100644 --- a/Main.sublime-menu +++ b/Main.sublime-menu @@ -14,8 +14,12 @@ "children": [ { - "command": "atomic_soft_tab_nav_edit_settings", - "caption": "Settings" + "caption": "Settings", + "command": "edit_settings", + "args": { + "base_file": "${packages}/Atomic Soft Tab Nav/Atomic Soft Tab Nav.sublime-settings", + "default": "// See the left pane for the list of settings and valid values\n{\n\t\"enable_line_nav\": ${0:false}\n}\n" + } } ] } diff --git a/atomic_soft_tab_nav.py b/atomic_soft_tab_nav.py index a617ec6..5721c89 100644 --- a/atomic_soft_tab_nav.py +++ b/atomic_soft_tab_nav.py @@ -129,20 +129,6 @@ def on_text_command(self, view, command_name, args): # Window Commands of Preferences -class AtomicSoftTabNavEditSettingsCommand(sublime_plugin.WindowCommand): - def run(self): - self.window.run_command( - 'edit_settings', - { - "base_file": "${packages}/Atomic Soft Tab Nav/Atomic Soft Tab Nav.sublime-settings", - "default": - "// See the left pane for the list of settings and valid values\n" - "{\n" - ' "enable_line_nav": false$0\n' - "}\n" - } - ) - class AtomicSoftTabNavSetLineNavSettingsCommand(sublime_plugin.WindowCommand): def run(self, **args):