Ctrl+H in sql editor to open Dash #176

Closed
trapias opened this Issue Feb 4, 2016 · 18 comments

Comments

Projects
None yet
3 participants
@trapias

trapias commented Feb 4, 2016

It would be nice to have the possibility to hit "ctrl+h" in editor, maybe after having selected a term, and to let this keystroke launch Dash (https://kapeli.com/dash), just like Sublime does for example, to look at documentation.

Note: I say Dash because I use that, but have nothing to do with them - which program to launch might be a configuration parameter, I guess.

More: per default, e.g. if no word is selected in editor, since "ctrl+h" is common for "help" might open Postico own help/help page. Optimum, @jakob , for me would be to see Postico docs into Dash 😄

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 4, 2016

Owner

You can use services to look up a term in Dash: Right Click on Word -> Services -> Look Up In Dash (Make sure you have "Look Up In Dash" enabled in System Preferences -> Keyboard -> Shortcuts -> Services -> Searching)

But I agree, maybe a shortcut would be useful. I'll contact the developer and see what I can do.

Owner

jakob commented Feb 4, 2016

You can use services to look up a term in Dash: Right Click on Word -> Services -> Look Up In Dash (Make sure you have "Look Up In Dash" enabled in System Preferences -> Keyboard -> Shortcuts -> Services -> Searching)

But I agree, maybe a shortcut would be useful. I'll contact the developer and see what I can do.

@trapias

This comment has been minimized.

Show comment
Hide comment
@trapias

trapias Feb 4, 2016

Sorry to bother @jakob, aren't you the developer? thought so 😄

Thanks!
al.

trapias commented Feb 4, 2016

Sorry to bother @jakob, aren't you the developer? thought so 😄

Thanks!
al.

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 4, 2016

Owner

@trapias yes, I'm the developer of Postico :)

I meant, I'll contact the developer of Dash to see how I can best do the integration.

Owner

jakob commented Feb 4, 2016

@trapias yes, I'm the developer of Postico :)

I meant, I'll contact the developer of Dash to see how I can best do the integration.

@trapias

This comment has been minimized.

Show comment
Hide comment
@trapias

trapias Feb 4, 2016

ops 😳 not my best day, today.

Also consider putting Postico help into Dash, why not? You just can ask the developer (of Postico) to write some documentation in spare time 😬

trapias commented Feb 4, 2016

ops 😳 not my best day, today.

Also consider putting Postico help into Dash, why not? You just can ask the developer (of Postico) to write some documentation in spare time 😬

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 4, 2016

Owner

OK, Bogdan, the developer of Dash pointed me to this page that explains how to do integrations -- looks like it's pretty straightforward. I'll see what I can do.

I'm not sure about putting Postico docs into Dash -- does that make sense? I thought that Dash was only useful for keyword based API docs... do you use it for other stuff too?

Owner

jakob commented Feb 4, 2016

OK, Bogdan, the developer of Dash pointed me to this page that explains how to do integrations -- looks like it's pretty straightforward. I'll see what I can do.

I'm not sure about putting Postico docs into Dash -- does that make sense? I thought that Dash was only useful for keyword based API docs... do you use it for other stuff too?

@trapias

This comment has been minimized.

Show comment
Hide comment
@trapias

trapias Feb 4, 2016

Great! Not a major functionality, but I'd love to have it.

Anyway, I have like 30 dockets installed, I find Dash to be useful on tons of cases. You're right maybe that's not where one would search for Postico docs...

trapias commented Feb 4, 2016

Great! Not a major functionality, but I'd love to have it.

Anyway, I have like 30 dockets installed, I find Dash to be useful on tons of cases. You're right maybe that's not where one would search for Postico docs...

@jakob jakob added the started label Feb 4, 2016

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 4, 2016

Owner

OK, I now added the shortcut Ctrl-H to lookup the current word in Dash. Obviously only useful if you have the psql docset installed.

You can try it here:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1308.zip

(This does override the "DeleteBackward" emacs key binding that Ctrl-H usually has in Cocoa text views. I hope that nobody uses that key binding -- but why should you, when you have a backspace key?)

Owner

jakob commented Feb 4, 2016

OK, I now added the shortcut Ctrl-H to lookup the current word in Dash. Obviously only useful if you have the psql docset installed.

You can try it here:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1308.zip

(This does override the "DeleteBackward" emacs key binding that Ctrl-H usually has in Cocoa text views. I hope that nobody uses that key binding -- but why should you, when you have a backspace key?)

@trapias

This comment has been minimized.

Show comment
Hide comment
@trapias

trapias Feb 4, 2016

@jakob GREAT! Working perfectly, thank you so much!!! 😄

trapias commented Feb 4, 2016

@jakob GREAT! Working perfectly, thank you so much!!! 😄

@qwesda

This comment has been minimized.

Show comment
Hide comment
@qwesda

qwesda Feb 4, 2016

Nice, I literally tried Ctrl + H yesterday to look something up in dash.

I doesn't work for multi word commands though, like CREATE TABLE.

qwesda commented Feb 4, 2016

Nice, I literally tried Ctrl + H yesterday to look something up in dash.

I doesn't work for multi word commands though, like CREATE TABLE.

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 4, 2016

Owner

You can select the words first, then press Ctrl-H to look it up... but I agree, it'd be nicer if Postico was smarter about the syntax. hmmm...

Owner

jakob commented Feb 4, 2016

You can select the words first, then press Ctrl-H to look it up... but I agree, it'd be nicer if Postico was smarter about the syntax. hmmm...

@qwesda

This comment has been minimized.

Show comment
Hide comment
@qwesda

qwesda Feb 4, 2016

Ah, I meant when I have CREATE TABLE selected it doesn't work, as in nothing happens.
Also the postgres docset in dash would expect it to be spelled CREATETABLE (without the space).

qwesda commented Feb 4, 2016

Ah, I meant when I have CREATE TABLE selected it doesn't work, as in nothing happens.
Also the postgres docset in dash would expect it to be spelled CREATETABLE (without the space).

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 4, 2016

Owner

@qwesda oh, OK, I misunderstood. Thanks for letting me know about this. I fixed it, it should work now:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1310.zip

Owner

jakob commented Feb 4, 2016

@qwesda oh, OK, I misunderstood. Thanks for letting me know about this. I fixed it, it should work now:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1310.zip

@qwesda

This comment has been minimized.

Show comment
Hide comment
@qwesda

qwesda Feb 4, 2016

works for me.

Sadly the docset itself it pretty bad and is only useful for keywords but not for functions.

qwesda commented Feb 4, 2016

works for me.

Sadly the docset itself it pretty bad and is only useful for keywords but not for functions.

@trapias

This comment has been minimized.

Show comment
Hide comment
@trapias

trapias Feb 5, 2016

@jakob looks like it works pretty well, I believe you could close this issue and just include the feature in next release.

Thank you 😄

trapias commented Feb 5, 2016

@jakob looks like it works pretty well, I believe you could close this issue and just include the feature in next release.

Thank you 😄

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 5, 2016

Owner

@trapias OK! I'll close the issue after the release (I don't want to close issues before I released the change, because then I often end up with duplicate issues -- most people don't look at closed issues)

Owner

jakob commented Feb 5, 2016

@trapias OK! I'll close the issue after the release (I don't want to close issues before I released the change, because then I often end up with duplicate issues -- most people don't look at closed issues)

@jakob jakob added done and removed started labels Feb 5, 2016

@trapias

This comment has been minimized.

Show comment
Hide comment
@trapias

trapias Feb 10, 2016

@jakob what about extending the "ctrl+h" feature to the "query status" textarea? In case you get errors, for example, it might help to quickly get help.

trapias commented Feb 10, 2016

@jakob what about extending the "ctrl+h" feature to the "query status" textarea? In case you get errors, for example, it might help to quickly get help.

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob May 25, 2016

Owner

I've decided not to add this feature to the query status area. I think most error message wouldn't lead to useful results in Dash. Also, you can already use the "Services" menu to look up words in Dash (just right click on a word in the result area)

Owner

jakob commented May 25, 2016

I've decided not to add this feature to the query status area. I think most error message wouldn't lead to useful results in Dash. Also, you can already use the "Services" menu to look up words in Dash (just right click on a word in the result area)

@jakob jakob closed this May 25, 2016

@trapias

This comment has been minimized.

Show comment
Hide comment
@trapias

trapias May 25, 2016

I agree, thanks for the update.

trapias commented May 25, 2016

I agree, thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment