Closed lengxf closed 7 years ago
In general I'm against the idea of default keymaps being provided by packages because you have the danger of collisions when users have installed multiple packages.
For example, a possible keymap for Prettify might be shift-cmd-j
, which isn't used by vanilla Atom. But it is used by the atom-script
package that I happen to have installed.
I don't have alt+cmd+j
mapped to anything on my machine (but you might). I can't know for sure what is mapped on any given user's machine. The best option IMHO is to provide commands for actions in a package so that users can easily map their favorite bindings to those commands using their personal keymap.cson
file.
@lengxf If alt-cmd-j
is an ok keymap for you, then do this:
keymap.cson
file by going to Keymap...
in your Atom menu.'atom-text-editor':
'alt-cmd-j': 'pretty-json:prettify'
NOTE: If you already have an
atom-text-editor
key in that file, you should add thealt-cmd-j
binding under that key, instead of adding a duplicate entry for it.
Please let me know if that makes sense and works for you. Thank you for the issue report and for using pretty-json
:)
thank you for your response , It works for you. Before this request, I have done, I try 'Pretty Json:Prettify' and 'pretty json:Prettify' and so on many times. so I make this request.
Can add a defualt keymap for pretty json ? thanks