From 09176cbdf4a294a91ac597d9248a8562b6bf9974 Mon Sep 17 00:00:00 2001 From: Kyle Bebak Date: Sun, 29 Oct 2023 01:52:22 -0600 Subject: [PATCH] Allow disable default key bindings --- Default (OSX).sublime-keymap | 16 +++++++++++++++- Default.sublime-keymap | 16 +++++++++++++++- README.md | 4 ++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Default (OSX).sublime-keymap b/Default (OSX).sublime-keymap index 461a2be..b065b57 100644 --- a/Default (OSX).sublime-keymap +++ b/Default (OSX).sublime-keymap @@ -1 +1,15 @@ -[{ "keys": ["ctrl+u"], "command": "open_url" }] +[ + { + "keys": [ + "ctrl+u" + ], + "command": "open_url", + "context": [ + { + "key": "setting.open_url.disable_default_key_bindings", + "operator": "not_equal", + "operand": true + } + ] + } +] diff --git a/Default.sublime-keymap b/Default.sublime-keymap index 5c7d043..3bda779 100644 --- a/Default.sublime-keymap +++ b/Default.sublime-keymap @@ -1,2 +1,16 @@ // Linux and Windows -[{ "keys": ["ctrl+alt+u"], "command": "open_url" }] +[ + { + "keys": [ + "ctrl+alt+u" + ], + "command": "open_url", + "context": [ + { + "key": "setting.open_url.disable_default_key_bindings", + "operator": "not_equal", + "operand": true + } + ] + } +] diff --git a/README.md b/README.md index 1903e8b..9f99d8d 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,10 @@ Some settings, especially the URL / path transforms like `aliases`, will probabl Project-specific settings override default and user settings. +### Disable default key bindings + +To do this, add `"open_url.disable_default_key_bindings": true` to `Preferences.sublime-settings`. + ## Release Notes [See Open URL's version history here](https://github.com/noahcoad/open-url/tree/master/messages).