Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure PhpStorm to open external documentation, namely devdocs.io

Tags:

phpstorm

I am looking for a plugin/settings to open http://devdocs.io (devdocs.io/#q=keyword) with currently selected text. Something similar to googleit plugin https://plugins.jetbrains.com/plugin/7402?pr=phpStorm, but with configurable url...

like image 320
jasir Avatar asked Oct 28 '25 08:10

jasir


2 Answers

You can do that with External Tools functionality.

The idea is to launch your app/script that will open such URL in a web browser.

How it can be done depends on your OS and tools you have got there. This is how it can be implemented on Windows OS (URL will be opened in your default web browser):

enter image description here

After you have create such external tool entry and it's working you can optionally assign custom shortcut. This can be done at Settings/Preferences | Keymap -- look for that entry under External Tools branch:

enter image description here


NOTE: Please note that if selection contains spaces then such search will partially fail as spaces will not be encoded into web safe + character (or %20) -- for such cases you will have to write shell/batch script that would perform such conversion and only then open such final URL.

like image 71
LazyOne Avatar answered Oct 30 '25 13:10

LazyOne


You can use External Tools for this:

File > Settings > Tools > External Tools > + (Add)

Enter a name like DevDocs. Depending on your OS and the web browser you are using, enter a command to open a website in Program. Use $SelectedText$ as a placeholder for the selected text in IntelliJ IDEA. So for example, looking up the selected text under Windows/Chrome, the command may look like this:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "http://devdocs.io/#q=$SelectedText$"

Now you can run the search from different places (which are listed under Show in in the same dialog) - e.g. MainMenu: Tools > External Tools > YourToolName.

like image 38
Darek Kay Avatar answered Oct 30 '25 14:10

Darek Kay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!