Glavin001 / atom-preview

:construction: (NO LONGER MAINTAINED) :construction: - :eyeglasses: Ultimate previewer of source code in Atom.
https://atom.io/packages/preview
MIT License
51 stars 23 forks source link

Shortcut to open / hide preview #117

Open screendriver opened 9 years ago

screendriver commented 9 years ago

Is there a keyboard shortcut to open and hide the preview?

ddavison commented 9 years ago

used to be Ctrl+Alt+Y I believe. you can set your own binding if you wanted. the action is preview:toggle

Glavin001 commented 9 years ago

@ddavison is correct. See https://github.com/Glavin001/atom-preview/blob/master/lib/preview.coffee#L29-L34

screendriver commented 9 years ago

Ok, thank you. This should definitely be displayed when I press Command + Shift + P and search for Preview :wink: All other commands shows there their keyboard shortcuts.

Glavin001 commented 9 years ago

I agree. Not sure why that is not the case. Could you inquire with the Atom team at https://github.com/atom/atom what the criteria is for being shown there? Thank you.

Applicable code: https://github.com/Glavin001/atom-preview/blob/master/lib/preview.coffee#L29-L34

screendriver commented 9 years ago

I've made an issue for that: https://github.com/atom/atom/issues/9758

ddavison commented 9 years ago

is Ctrl+shift+Y really reserved though? in our keymap cson file, it's commented out.

Glavin001 commented 9 years ago

Looks like it might be disabled / keymap not setup by default.

Glavin001 commented 9 years ago

Well I am not sure if we want to reserve a keymapping or simple let Users create their own. I usually search for preview in the Atom command palette instead.

screendriver commented 9 years ago

For new users that are using preview a lot it's more comfortable to have a keyboard shortcut :wink:

Glavin001 commented 9 years ago

Sure. I am open to suggestions for what the key mapping should be, and that does not collide with other packages.

I am happy to review and merge a Pull Request enabling a keyboard shortcut.

screendriver commented 9 years ago

⌘ Shift P is unfortunately occupied :wink:

What about ⌘P ⌘R (PReview)?

Glavin001 commented 9 years ago

Is there a website to search for existing keyboard shortcuts across all packages for Atom? That would be helpful to make sure we avoid collisions.

⌘P + ⌘R sounds good so far. Doubt anyone has taken that already.

I am ready and willing to receive any Pull Requests on this matter :smile:. Thanks!

screendriver commented 9 years ago

Is there a website to search for existing keyboard shortcuts across all packages for Atom? That would be helpful to make sure we avoid collisions.

That would be a great feature. But I don't believe that something exist that can do that. Sorry I can't make a pull request. I don't know how to write packages for Atom and how to modify atom-preview for that :confused: