From 34842ae29b589274455501554ed1ca4bd7c55294 Mon Sep 17 00:00:00 2001 From: Koen Lageveen Date: Tue, 15 Sep 2020 11:53:44 +0200 Subject: [PATCH] hyper_click -> HyperClick + settings command For everything user-facing, the package is called HyperClick and the settings files etc. should match. This is also consistent with other packages in the eco system. Also, renaming the settings file prevents confusion and gives users a clean slate. --- HyperClick.sublime-commands | 14 ++++++++++++++ ...sublime-settings => HyperClick.sublime-settings | 4 ++-- Main.sublime-menu | 4 ++-- README.md | 11 +++++++---- hyper_click.sublime-commands | 6 ------ hyper_click_command.py | 2 +- 6 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 HyperClick.sublime-commands rename hyper_click.sublime-settings => HyperClick.sublime-settings (98%) delete mode 100644 hyper_click.sublime-commands diff --git a/HyperClick.sublime-commands b/HyperClick.sublime-commands new file mode 100644 index 0000000..a0898c7 --- /dev/null +++ b/HyperClick.sublime-commands @@ -0,0 +1,14 @@ +[ + { + "caption": "HyperClick: Goto File", + "command": "hyper_click_jump" + }, + { + "caption": "Preferences: HyperClick Settings", + "command": "edit_settings", "args": + { + "base_file": "${packages}/HyperClick/HyperClick.sublime-settings", + "default": "// HyperClick Settings - User\n{\n\t$0\n}\n" + } + } +] diff --git a/hyper_click.sublime-settings b/HyperClick.sublime-settings similarity index 98% rename from hyper_click.sublime-settings rename to HyperClick.sublime-settings index 21b5cd5..1cf24fe 100644 --- a/hyper_click.sublime-settings +++ b/HyperClick.sublime-settings @@ -1,7 +1,7 @@ { // Enable and tweak the inline annotations - "annotation_found_text": "➜", - "annotation_not_found_text": "✘", + "annotation_found_text": "→", + "annotation_not_found_text": "×", "annotations_enabled": true, // HyperClick is enabled when the current scope matches this selector diff --git a/Main.sublime-menu b/Main.sublime-menu index e562e53..aea57c5 100644 --- a/Main.sublime-menu +++ b/Main.sublime-menu @@ -18,8 +18,8 @@ { "command": "edit_settings", "args": { - "base_file": "${packages}/HyperClick/hyper_click.sublime-settings", - "default": "// HyperClick Preferences – User\n// ====================================================\n\n{\n\t$0\n}\n" + "base_file": "${packages}/HyperClick/HyperClick.sublime-settings", + "default": "// HyperClick Settings - User\n{\n\t$0\n}\n" }, "caption": "Settings" }, diff --git a/README.md b/README.md index afd77bf..468e915 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,13 @@ HyperClick extends the use of the F12 (`Go to definition`) shortcut, ## Settings You can customize HyperClick settings by going to -`Preferences > Package Settings > HyperClick > Settings` +`Preferences > Package Settings > HyperClick > Settings`, or calling `Preferences: HyperClick Settings` from the command palette. ### Project settings You can use [project settings](https://www.sublimetext.com/docs/3/projects.html) to configure HyperClick to look for files at specific dirs, through the settings `"lookup_paths"` and `"aliases"`. -To open the project settings file, go to `Project > Settings`. If the `Settings` option is grayed out, choose the option `Save Project As...` (right above it) to save it to disk. The `Settings` option can now be clicked. +To open the project settings file, go to `Project > Settings`. If the `Settings` option is grayed out, choose the option `Save Project As...` (right above it) to save it to disk. The `Settings` option can now be selected. #### Example @@ -60,7 +60,7 @@ To open the project settings file, go to `Project > Settings`. If the `Settings` } ], "settings": { - "hyper_click": { + "HyperClick": { "scopes": { "source.sass": { "lookup_paths": [ @@ -81,9 +81,12 @@ To open the project settings file, go to `Project > Settings`. If the `Settings` ### Upgrading settings for 2.0 -In 2.0 the settings structure was inverted, and no longer relies on syntax filename mapping. +In 2.0 the language-specific settings no longer rely on syntax filename mapping. Each language is supported via an entry in the "scopes" object, by the language ["scope"](https://www.sublimetext.com/docs/3/scope_naming.html) name. +To prevent conflicting settings (and for consistency), the settings file has been renamed to [HyperClick.sublime-settings](https://github.com/aziz/SublimeHyperClick/blob/master/HyperClick.sublime-settings). If you have any old settings, they're in `Packages/User/hyper_click.sublime-settings` (where `Packages` can be found via Preferences > Browse Packages). +Project settings have been moved from the `hyper_click` + To upgrade your settings, the first step is to rearrange the settings to this new structure. Then: - Remove now unused settings "supported_syntaxes", "default_filenames". diff --git a/hyper_click.sublime-commands b/hyper_click.sublime-commands deleted file mode 100644 index 58b4e98..0000000 --- a/hyper_click.sublime-commands +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "caption": "HyperClick: Goto File", - "command": "hyper_click_jump" - } -] diff --git a/hyper_click_command.py b/hyper_click_command.py index 43ba55f..acd23a4 100644 --- a/hyper_click_command.py +++ b/hyper_click_command.py @@ -19,7 +19,7 @@ class HyperClickJumpCommand(sublime_plugin.TextCommand): def __init__(self, view): self.current_line = (-1, -1) self.view = view - self.settings = sublime.load_settings('hyper_click.sublime-settings') + self.settings = sublime.load_settings('HyperClick.sublime-settings') self.window = view.window() def want_event(self):