I searched but could not quite find this information anywhere else. Could you list the best shortcut keys Squirrel?
I know it is possible to avoid a lot of typing with this feature of the tool.
The only one I know is to type SF and then press the spacebar. The result is SELECT * FROM.
Go to the Menu bar:
Session -> Syntax -> Configure auto correct / abreviations
Make sure that Enable auto correct / abreviation checkbox is selected. Here you can see the existing list and also add abreviations of your own ;)
Using the menu option "Session-Syntax-Configure auto correct/abreviations" you can specify your own abreviations. I like to add SCF as an abreviation of SELECT COUNT(*) FROM.
Following link lists a few keyboard shortcuts that might help
https://stackoverflow.com/tags/squirrel-sql/info
In SQuirrel, to find keyboard shortcuts, press ctrl + t and you will see the list.
Related
In Sublime, I commonly use my cursor to select multiple lines, then use Command + Shift + L to select each line with multiple cursors.
I'm unable to find any documentation or pre-built option within PHPStorm that can handle this.
Does anyone have a solution? Thanks!.
TLDR: ⌥ + Shift + Drag does what you want. On keymap you can also select the Sublime key binding template for general familiarity.
Overview
A great overview of multiple cursors in Jetbrains products and 4 minutes well spent (some minor variants may be present in the exact bindings, but not hard to work out) is:
https://www.youtube.com/watch?v=JBkGOPR3-nA
Three answers to your question:
1. Out of the box
⌥ + Shift + Drag does what you want.
Also relevant:
Press ⌥ (Option) twice, and then without releasing it, press up or down arrow keys. That will add a caret at the start of each line.
There are many more variations:
https://www.jetbrains.com/help/rider/Multicursor.html
https://blog.jetbrains.com/phpstorm/2014/03/working-with-multiple-selection-in-phpstorm-8-eap/
2. Keymap templates
If you go to preferences -> keymap you will find a dropdown with a list of templates. You can select Sublime Text or Sublime Text (OS). This is not always perfect because other plugins can override the key bindings in sometimes opaque ways, so not every single binding ports; but it should bring you a whole bunch of familiarity.
3. Custom
You can create your own key and mouse bindings for any PHPStorm action by going to preferences -> keymap and right clicking on the action; or searching for an action and then right clicking, etc.
I have this task that I need to complete fast as possible. I have coupon codes (over 1000), I going to create an array out of it. To do that fast as possible I need to be able select multiples lines and edit them at the same time. I am using Atom as my editor choice. I tried to search online for answers but non found.
ST55672
SE82673
SS85074
SD65675
SH75676
to:
"ST55672",
"SE82673",
"SS85074",
"SD65675",
"SH75676",
PS. Im using Mac
1. Atom Commands
Select all text (Cmd+A on Mac, Ctrl+A elsewhere), then use the shortcut to “split the selection into lines” (Cmd+Shift+L on Mac, Ctrl+Shift+L elsewhere). Both commands are also available from the command palette.
PS: like many other keyboard shortcuts, these also work in Sublime Text
2. RegEx Search & Replace
Search for ^(.*)$ and replace with "$1",.
Notice for windows users:
multiline cursor works using these keys in the following order :
CTRL + ALT +
and ↓, or ↑, or a mouse "Click" any where you need
select all lines
Go to selection menu on the top bar (win & Linux)
select split selection into lines
In PhpStorm 9.0.2 (I do not know about the newer versions, but I am afraid it will be the same) when you search for something and get the results in the Find tab, you can mark certain results as irrelevat by selecting them and pressing the del key and this will strike them out.
When you search for something very common, which can have 5000+ occurences, even by striking some results out, the Find tab becomes very bloated.
Is there a way to completely remove a result from the Find tab, instead of just striking it out?
When using Find/Replace in Path functionality and you know that you will get a lot of results it's better to limit your search scope by either specific path, specific file extensions or some custom scope (using Scopes functionality).
If such "limiting" cannot not help (e.g. you really need to go trough each occurrence) then use Alt + Delete (the Remove action).
Please note that this action is most likely available since PhpStorm v10 only (it was added only recently).
You can check if you have it and what the shortcut is via content menu:
You can use this keymap shortcut : ALT + SUPPR (this remove the result out of the find tab)
instead of
keymap shortcut : SUPPR (this JUST exclude the result of the find tab with underline this not remove)
EDIT :
This is the exact response for your issue. Look at this screenshoot which say all :)
The situation is: in my html-file I have a lot of "href" attributes to be filled with specific links. And I can get multiple cursors on every needed place.(via Ctrl+D, or Alt+Enter).
Now it would be very helpful if I could switch between this cursors with tab(like emmet plugin does with self-generated html-content, if you know what I'm talking about).
You can have multi cursor, and switch between them in using :
Ctrl + F3
or
Ctrl + Shift + F3
You can get the behavior I believe you want by selecting all the "href" attributes using ctrl+d. If you are selecting all of them, you cna run the find_all_under command (alt + f3 in windows, unsure of other platforms but you can search for the command). Then, bookmark the cursor positions (ctrl+f2 in windows). You can then use f2 to cycle through the bookmarks. You could bind the appropriate command to tab if you want also, though you would have to do some work do you don't break normal tab behavior.
As a side note, I believe emmet simply inserts a snippet, so it defines various locations for the cursor to jump to through the built in snippet behavior.
#Jahnux solution may be more ideal since you wouldn't have to select initially, but I believe you would have to move the cursor back to the "href" attribute for continuing to the next token.
You may also want to investigate simply using the find functionality, though perhaps you have run into some limitations with that.
In most other editors, I can select a portion of the text I want to run find and replace on and then hit the ctrl + h combination. A screen pops up asking me what to find and what to replace. How do I do this in PHPStorm?
If you are using the Default keymapping (you can also use the keymaps for Eclipse, Visual Studio, etc) press Ctrl+r to show the Replace Toolbar. If you already have a selection then the option In Selection will already be checked, otherwise you can check it and then do your selection (if you select first and check the option second it will unselect the text after checking the option).
The feature is called Replace in the Keymap configuration if you wish to change the shortcut.
You can also press Shift+F6 to directly rename variables if that's what you want to do.
Highlight the code selection you wish to work on
( you can use alt + arrow up if your looking for a cool way to do that)
Press Ctlr + r on PC or Command + r on a Mac
In the upper options window, insert the values you wish to replace
Select the "in selection" check box
Press Replace/Replace all button