I need to assign hot keys to live templates in WebStorm.
It's not suitable to press Ctrl + Alt + T and select live template from the list, I need to press hot key combination. I need it for surround templates.
Not currently possible, please vote for IDEA-67811 to be notified on any progress with this feature
Related
In SAP Web IDE it offers a manual way of using multiple cursors. I'm used to using this via Ctrl+D and I find this manual way of doing it frustrating.
Is there any way to add the Ctrl+D way via a plugin?
I was also looking for a way to have the Ctrl + D functionality in the SAP Web IDE (Full-Stack). Now we discovered that there is a similar functionality implemented where you can have a cursor at each occurrence of the searched term.
select the string you want to search for
press Ctrl + F
press Alt + Enter to get a cursor at each occurrence of the searched string
Of course it´s a bit more complicated than just pressing Ctrl + D in other editors like Atom, VS Code, ...
I would also appreciate a way to only get one more cursor per shortcut-press and not a cursor for each occurrence in the whole file.
Another thing which helped me was the Shift + Alt shortcut to get a cursor in each line underneath each other:
place the cursor in the line where you want to have the first cursor
press Shift + Alt and keep it pressed
click at the line where you want to have your last cursor and release Shift + Alt
I hope this helps.
In Sublime Text there's a way to highlight all similar strings by setting a cursor to every one of them, and then you can just type something, and this text will be printed in every highlight area. In rus version it's called "multicursor".
Is there something like that in CodeRush?
I know about "Replace all" function in Visual Studio. But this approach is not as convenient as the approach described earlier.
Something like that you can see in Rename feature of CodeRush.
Documentation:
When the Rename is activated, it turns all references to the selected
variable into the linked identifiers.
Linked identifiers are related sections that are kept synchronized. If
you change the text within one of them, all others get updated
accordingly.
There are also the Multi-Select feature which allows you to select separate text blocks by pressing CTRL + ALT + ENTER, but this feature does not allows you to edit every highlight area:
We have an MFC application that uses the CHeaderCtrl and have been using the HDS_FILTERBAR style to filter data. Works great. But our users want to be able to paste in text into the filter cell. I have not found a way to get a pointer to any CEdit-type of control here so that I can call >Paste. I have managed to detect a Control-V while in the filter in the application's ::PreTranslateMessage. There is a way to send text to the filter by way of a CHeaderCtrl->SetItem call, but this will immediately launch the filter. I just want to be able to paste text.
So...I tried (I was desperate) using keybd_event and SendInput to force keystrokes. This worked but had undesirable side effects, probably due to MFC's message handling, and in my case, the user already had the Control + V pressed down. But in just sending the letter 'A', and forcing the SHIFT key, I accidently discovered that the CHeaderCtrl's filter does support a paste if you:
CONTROL + SHIFT + V
The problem is its hard to do, and hard to tell my users to do this.
I can simulate this sequence using keybd_event, but again, its real quirky.
Can anyone find a way to either get access to the CEdit (if there even is one) to a filtered CHeaderCtrl or know of another workaround ? I tried using a spy utility, but was not sure what to look for. Sorry for the long post.
So remove Ctrl+V from the accelerator list and you can handle it inside the control...
(Answer added according to the comment).
I want to show pop up code completion hint and word expand (which is equal to Ctrl + N in Vim). Now I type Ctrl+E to popup expand word and I type Ctrl + Shift to popup code completion hint...
Do you have any idea how this could be done?
One of the lesser-known but potentially powerful features of the keymap is that you can map multiple actions to the same shortcut. You could try doing this for the two things you want to have happen at once.
In Settings → Keymap, you can change what action is triggered by what shortcut.
You can find the actions you're looking for either by name (if you know what they're called in WebStorm), or by their shortcut (by clicking on the Find actions by shortcut button next to the action name search box).
Once you've decided which keyboard shortcut you want to trigger both actions, you can assign it to both actions. You may get a popup about possible conflicts with other actions, with an option to either Remove the other shortcuts or Leave them be.
It may be obvious at this point, but you want to Leave the other shortcut in place so that both actions will be triggered.
Hope this helps!
I don't think it's possible, check the related requests:
IDEABKL-3262 Word Completion
IDEABKL-6021 introduce new completion type similar to expand word
The first request is most likely your use case:
provide reasonable variants to complete when any completion based on context language analysis fail or absent
If you want to indent several lines in Python IDLE you just mark the lines and hit Tab. But what if you want to remove the indent from several lines? Shift+Tab does not work for that in IDLE.
If you're using IDLE, you can use Ctrl+] to indent and Ctrl+[ to unindent.
If you're using IDLE, and the Norwegian keyboard makes Ctrl-[ a problem, you can change the key.
Go Options->Configure IDLE.
Click the Keys tab.
If necessary, click Save as New Custom Key Set.
With your custom key set, find "dedent-region" in the list.
Click Get New Keys for Selection.
etc
I tried putting in shift-Tab and that worked nicely.
Depends on your editor.
Have you tried Shift+Tab?
in pythonwin,
SHIFT + TAB works
For IDLE, select the lines, then open the "Format" menu. (Between "Edit" and "Run" if you're having trouble finding it.) This will also give you the keyboard shortcut, for me it turned out that dedent shortcut was "Ctrl+["
Shift-Tab
Ctrl-Tab
< key
depends on your editor.
In Jupyter Notebook,
SHIFT+ TAB(to move left) and TAB(to move right) movement is perfectly working.
By default, IDLE has it on Shift-Left Bracket. However, if you want, you can customise it to be Shift-Tab by clicking Options --> Configure IDLE --> Keys --> Use a Custom Key Set --> dedent-region --> Get New Keys for Selection
Then you can choose whatever combination you want. (Don't forget to click apply otherwise all the settings would not get affected.)