PhpStorm: how to go back after a Ctrl+B? - phpstorm

Can someone tell me if there is a shortcut in PhpStorm that allows to go back to the file I was before I press Ctrl+B shortcut?
Edit: Ctrl+B may be the key shortcut for navigating to the declaration of a variable (the part of the code that states what $var is set to).

Yes, there is shortcut for that: ALT + left (Navigate -> Back)

The command Back from the Navigate menu should do what you need. On OSX, using the default keymap, its shortcut is Alt-Cmd-Left.

Related

How can I move focus from any other tool window to text editor in 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.

PhpStorm uses Ctrl instead of Command

PhpStorm uses Ctrl instead of 'Command' on Mac OS. Can anyone help me change it quickly? It's ruining my life
Take a look at https://www.jetbrains.com/help/phpstorm/2016.2/configuring-keyboard-shortcuts.html That guide should help you get your keyboard shortcuts set to command instead of ctrl
Same issue here, it turns out I changed the keymap configuration to a different version and forgot about it.
I just switched to Default and now all cmd shortcuts work just fine.
To do this:
Go to Preferences
Click Keymap
In the right screen, change the dropdown to your liking.

Is there a keyboard shortcut to select current line in PhpStorm?

In PhpStorm there is shortcut to extend selecting ctrl + w. It there shortcut to select all current line? I looking for something that works like ctrl + l in Sublime?
Such action is available ... but assigned shortcut (if any) depends on actual keymap used.
In any case:
Settings/Preferences | Keymap
Locate Editor Actions | Select line at Caret entry (HINT: use local search box)
Assign any shortcut you wish (or use provided one, if that keymap has one)
P.S.
If you want to select current line to copy/cut it as a next step ... then you can just use Copy or Cut straight away -- it will copy/cut current line if no selection is made (default behaviour -- can be turned off via hidden setting).
Yes - go to Settings > Keymap and search for "Select line at caret". You can map it to any keyboard shortcut you like by right-clicking it and select "Add Keyboard Shortcut".
If you try to assign a keyboard shortcut which is already assigned to something else, PhpStorm will let you decide whether to continue or change your keybind.

Hotkey to jump past closing brackets in JetBrains PhpStorm

Right now I'm just using PhpStorm to work with some HTML, and it's great in that it auto indents and automatically closes out HTML tags.
The only problem is this feature doesn't really save me any time because I then have to use my mouse or arrow keys to navigate past the closing tag when I reach it. For example I type <p> and it closes it out <p></p> with my cursor in between, but when I'm done I either have to manually navigate past the closing bracket or use Shift+Enter to jump down to the next line (which isn't always what I want to do).
Is there a command that will just jump me to the end of the next closing bracket, or is there a way of setting this up? I've googled it but haven't been able to find anything.
I've googled it but haven't been able to find anything.
Well... Help | Default Keymap Reference has the most needed shortcuts and actions listed and the one you need is there.
In any case:
Ctrl + ] -- Navigate to code block end -- will jump to the closest closing tag (in HTML) or brace/closing keyword (CSS, PHP).
Ctrl + [ will do the opposite -- jump to the opening tag.
There are few other actions that can help here but may not have any shortcuts assigned by default -- check them in Settings (Preferences on Mac) | Appearance & Behaviour | Keymap (it has search by action name and even by already assigned shortcuts).
Another alternative (or better say -- advanced navigation) would be using AceJump pluign (you have to see it in action -- you either like or hate it).. or even Vim mode navigation (via IdeaVim plugin).
The simplest way to go about this is to press Command + -> (command+right arrow key) when your cursor is inside the brackets, and this will bring you behind the last bracket.
At least, I believe this is what you're asking.
hi, use mac os for: cmd + option + ]

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.