Comments (8)
@PhiLhoSoft Copy to Current Document is meant for generating markup (e.g. to paste into a wiki page), so I don't want to remove that.
I agree that this should work better with the override shortcut functionality recently added to Brackets. I was thinking about providing a right-click menu on shortcuts and provide with an "Override" Command. Override Command would open keymap.json file and insert an entry for selected shortcut. User would have to manually edit existing shortcut to new shortcut and then Save file. How does that sound?
At the very least, panel should allow selection so you can copy a command id (which I tried to do recently :) ).
Care to submit a pull request?
from brackets-display-shortcuts.
Yes, I refrained from suggesting to remove the current button... :-) It can be useful... in some rare cases! :-D
For the pull request, I am currently learning how extensions work in Brackets, so it might take a while. ;-)
from brackets-display-shortcuts.
@PhiLhoSoft I added Override Shortcut and Disable Shortcut commands in this pull request. Does this satisfy you need?
from brackets-display-shortcuts.
Nice. I suggest to detect if a command is already disabled, so the menu acts as a toggle: I was able to deactivate twice the same command, resulting in a duplicated line in the keymap.json file.
The issue might be tracking the current assignment, to be able to restore it...
The Override shortcut command is a bit ambiguous, as it results instead in an override of the command, where we define a new shortcut for it. Or perhaps there should be both capabilities?
Side note: you add tabs in this file that seems to use spaces for indenting.
from brackets-display-shortcuts.
@PhiLhoSoft Thanks for reviewing these changes! Comments below.
I suggest to detect if a command is already disabled, so the menu acts as a toggle: I was able to deactivate twice the same command, resulting in a duplicated line in the keymap.json file.
The issue might be tracking the current assignment, to be able to restore it...
This functionality simplify facilitates editing the keymap.json file. It makes copying the command ids and keybindings easier. It would be a fair amount of work to get even a little smarter, so I probably won't be trying to do that.
The KeyBindingManager
validates the file when you hit Save, but I guess that case is not critical enough to detect -- it shouldn't cause any problems in your configuration.
One update that I will consider (i.e. need to research) is to update the update the Shortcuts panel when keymap.json file is Saved to disk and keybindings are updated. This will fix the problem with being able to disable a shortcut twice because it will no longer be in the list.
The Override shortcut command is a bit ambiguous, as it results instead in an override of the command, where we define a new shortcut for it. Or perhaps there should be both capabilities?
You can't really override a command from here, but I think the command name could be more clear. What do you think about "Override Shortcut for Command" ?
Side note: you add tabs in this file that seems to use spaces for indenting.
The code should use your indent settings when editing that file. That's what you'll get when editing that file manually (using Debug > Open User Key Map), so that seems like the right thing to do. Let me know if it's not using your settings.
from brackets-display-shortcuts.
The Override shortcut command is a bit ambiguous, as it results instead in an override of the command, where we define a new shortcut for it. Or perhaps there should be both capabilities?
You can't really override a command from here, but I think the command name could be more clear. What do you think about "Override Shortcut for Command" ?
Actually, it's valid to have multiple shortcuts for a single command, so maybe message should say "Add Shortcut for Command" ?
from brackets-display-shortcuts.
This functionality simplify facilitates editing the keymap.json file.
OK, fair enough. And of course the toggle can be made just by removing the override.
"Add Shortcut for Command" sounds good.
[Off Topic] I didn't realize all these caps in menu items. I wonder what UI guideline they follow. Windows guideline recommend using simpler "Add shortcut for command", less sententious... Capitalized first letters are reserved for titles (of windows, of sections, etc.).
from brackets-display-shortcuts.
Good question about the capitalization. I looked at the context menus in Brackets and the words that are key to the command seem to be capitalized, so this seems consistent and I'll just leave it like this for now. Thanks for your feedback!
Merged with #46. Closing this issue.
from brackets-display-shortcuts.
Related Issues (20)
- Table does not take up 100% of width HOT 1
- Table no longer has zebra striping HOT 1
- No menu shortcut + console error message HOT 8
- Remove unused reference to DocumentManager HOT 1
- Add the ability to change shortcuts HOT 2
- It is possible to use second keystroke like ctrl+K, ctrl+D? HOT 1
- css anomaly affects left panel HOT 1
- Remove + from Key Binding listing please? HOT 3
- Warning on the console HOT 2
- Request: Add link to Extension HOT 3
- Add no-width spaces to output for better line breaking
- Change shortcut so it doesn't conflict with Code Folding HOT 1
- Update Shortcuts panel when KeyBindings are updated HOT 1
- Copy to Current Document is broken HOT 1
- [reccomendation] enter shortcut in search bar HOT 2
- [Bug] Shortcut OSX doesnt work HOT 11
- main.js:165 Uncaught TypeError: Cannot read property 'on' of undefined HOT 2
- Add package.json file HOT 1
- Getting deprecation warning in Dev Tools console HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brackets-display-shortcuts.