How can I move focus from any other tool window to text editor in PhpStorm? - phpstorm

For an example after I go to the Project tab with Alt+1 shortcut and open specific file with pressing Enter I then want to go and edit content with single shortcut. Is there any way to do it?
There is couple of things that I can use, but neither does exactly what I want:
Ctrl+Tab - that opens the switcher and selects next file in switcher instead of allowing me to edit file with single Ctrl+Tab
Ctrl+E or Ctrl+Shift+E do different things but basically the result is simmilar as above
What I want is to simply edit the file after opening it with keyboard from Projects tab (without using mouse).

How can I move focus from any other tool window to text editor in PhpStorm?
Just press Esc key.
Works in every tool window. For built-in Terminal though you can (may have to) configure different shortcut for such action (as Esc can be needed there).
For an example after I go to the Project tab with Alt+1 shortcut and open specific file with pressing Enter I then want to go and edit content with single shortcut. Is there any way to do it?
Use F4 for that (action is available in context menu and called Jump to Source).
Ctrl+Tab - that opens the switcher and selects next file in switcher instead of allowing me to edit file with single Ctrl+Tab
Just press and release it quickly: it works just like Alt + Tab on Windows. If you keep modifier key pressed (Ctrl in this particular case) it will keep the Switcher window opened.

Related

Keyboard shortcut to access Chrome bookmarks (mac)

I seem to be almost entirely mouse-free at this point, minus being able to access the Bookmarks bar in Chrome with a keyboard shortcut! I've searched the web quite a bit for an answer, but to no avail....any ideas or workaround?
EDIT: Use Firefox. You can CMD + B --> will open Bookmarks navigator, and you can type to search, hit TAB, and then arrow through results
If you are hoping to click on the actual bookmarks on your Google Chrome browser, using keyboard shortcuts, on Mac, you can make use of Mac's Keyboard shortcuts feature.
Open System settings app
Open Shortcuts section under Keyboard
Choose App shortcuts
Click +
Choose Google Chrome as application
On the title field, enter Bookmarks->{Bookmark-name-goes-here}
Set a hotkey
Save the changes and you can now use this hotkey to call that bookmark. This basically is setting a shortcut to your browser's menu item.
Holmes is an extension that allows a shortcut activated bookmark search similar to Garrett's answer but without the "read and change all the data on any websites that you visit" permission.
Install the tool then press shift+alt+H
⌘ + Option + b
or
⌘ + Shift + b
Try this shortcut
cmd+opt+B
I found a chrome plugin that is super useful and goes beyond what I was hoping for. It's called Bookmark Navigator. Here is the link https://chrome.google.com/webstore/detail/bookmark-navigator/bfibpphfhdpgkmbpkfmhdiklgcfmmkha
Below is a picture of what it looks like. The tool is summoned with cmd + b, and then you can start typing to search all of your bookmarks. You can press enter to access the bookmark at top of list, or use arrow keys to navigate further down the list.
This is the fastest and most user friendly option I have found.

PhpStorm single click preview like Sublime Text

At my new job I have to work with PhpStorm. I come from Sublime Text, and what bothers me most about PhpStorm is the lack of a single click preview of the files. In stead, it opens the files for editing and adds them to active tab, leaving me with A LOT of useless tabs.
I searched here on StackOverflow and Google, but I seem to be the only one who is annoyed by this. In Sublime it goes to edit mode only after a double click. Is there a setting or plugin to have it like in Sublime?
It's a native feature these days:
Settings... / Editor / General / Editor Tabs / Opening Policy > check "Enable preview tab"
on version PhpStorm 2022.3.2
Single Click To Open File
By default to open a file in phpstorm you have to double click it. I found this to be very annoying. Luckily you can change this to be a single click.
Steps:
Click the gear icon.
Make sure 'Autoscroll to Source' is checked
Make sure 'Autoscroll from Sourcce' is checked
http://www.ryanwright.me/cookbook/phpstorm/single-click-open-file
There is no such functionality currently available. I may only suggest to use View | Quick Definition to preview files.
Other than that: https://youtrack.jetbrains.com/issue/IDEA-130918 -- watch this ticket (star/vote/comment) to get notified on progress.
Welcome in late 2019 - we got a plugin for this now:
Plugin: https://plugins.jetbrains.com/plugin/12778-quick-file-preview
Plugin Source: https://github.com/SeeSharpSoft/intellij-file-preview
IntelliJ Issue: https://youtrack.jetbrains.com/issue/IDEA-130918
Don't forget to disable the "Autoscroll to Source" Feature, to get the full advantage of the plugin!
The closest you'll get right now is to enable 'Scroll To Source', however this will actually open the file in another tab, it will not be a preview.
Open the Project, Favorites, etc. side bar (cmd + 1 or ctrl + 1)
Click the gear in the top right
Select 'Scroll to Source'
Note 'Scroll to Source' can be enabled at the same as 'Scroll from Source', just make sure if you click on one file you wait until the sidebar catches up to click another, otherwise the sidebar will autoscroll back and forth between the two. You'll have to click one of them to break that loop.
Read more on JetBrains' website
This is now available as a native feature in the latest version: 2020.3!
See this comment on the YouTrack link someone posted above https://youtrack.jetbrains.com/issue/IDEA-130918#focus=Comments-27-4500169.0-0
Also on the 2020.3 feature list under User Experience there's a mention of "preview tab" here https://blog.jetbrains.com/idea/2020/12/intellij-idea-2020-3/

How to switch to source code in PhpStorm?

I want to be able to quickly switch to the code editor window in PhpStorm. I've found "jump to source" hotkey, but it works that way: if I have some folder selected in my directory tree ("Project", on the left side) and I use the hotkey (F4 by default) I won't get switched. Also, if some other file has been selected in directory tree I'll get switched to the code of the selected file. However, I just want to emit clicking on the editor field using mouse. Just switch.
However, I just want to emit clicking on the editor field using mouse. Just switch.
Just Esc -- that's it.

Mouse Right Click Keyboard Shortcut in PHPStorm

In most Windows applications, I am able to replicate the right mouse button click using the combo Shift + F10. Shift + F10 is mapped as a shortcut to debug my current file in PHPStorm. I've looked around the mapping section in settings but wasn't able to find a way to restore this combo so that it mimics a right mouse click. Is this possible in PHPStorm?
The action you need is called Show Context Menu and located under Other branch in Settings | Keymap
P.S.
Screenshot above shows Shift+F10 shortcut already assigned to it.
P.P.S.
It is for v6, but I assume it will work in v5 as well.

Assign the Shortcut key for Chrome Extension Option page

How can I assign my Google chrome extension option page with shortcut key.
The following works almost as good as a shortcut,
Go to location bar, press Ctrl+L
Type "ce" OR "cs",
Press Enter.
After setting it up as follows,
What I do is, I set them up as search engines on
chrome://settings/searchEngines
Name - Shortcut - URL Chrome Extensions - ce - chrome://extensions/
Name - Shortcut - URL Chrome Settings - cs - chrome://settings/
http://productforums.google.com/forum/#!topic/chrome/hqYtz15LrgQ
Hope this helps!
Currently there is no better way other than injecting content script to all pages with keypress listener. As you would imagine this approach not only isn't very effective, but wouldn't work on some pages (chrome://newtab would be the most annoying one).
Unless assigning a shortcut to your options page is crucial, I wouldn't bother doing it.
I think the options page is meant to be open only from the extension control panel links. However, to solve the shortcut part of the problem you can use the new commands API which will free you from having javascript listeners injected on every page. The shortcuts will work even if you don't have a page loaded in your tab.
You could use this autohotkey script:
#IfWinActive, ahk_class Chrome_WidgetWin_1 ; Shortcut functions only on Chrome
^q::Send, ^t chrome://extensions/ {enter} ; functioning script
#IfWinActive
The second line is the script and means that if you press Ctrl+q (^ stays for Crtl) the script opens a new Tab (Ctrl+t), type the address (chrome://extensions/) and press enter.
You can change the shortcut key changing what is before the ::.
Then I suggest you to put the file .exe in the startup folder.