I would like to add a markdown cell in Jupyter Notebook using a shortcut, since adding a new cell and changing it to Markdown cell takes so much steps and feels painstaking at times.
But it seems that there is no such shortcut; so now I'm searching for a way, if any, to add a custom shortcut in Jupyter Notebook.
Is it possible to define a custom shortcut?
Jupyter has a way to customize keyboard shortcuts. However, I'm not sure if what you're asking is available. I don't find it that tedious to add a Markdown cell by quickly pressing esc (a or b) m enter in succession, where (a or b) is if you want the cell above or below the current cell.
Related
When I use the shortcut associated with "search.action.focusNextSearchResult" in vscode while searching something nothing happens.
This action is initially associated with F4 which is also used for other shortcuts. I thought it may be the problem so I reassigned it to an unused shortcut but it did not help.
I am using the extension "Emacs Friendly Keymap" (don't know if it can cause the problem).
Do you know how I could make it work?
That shortcut, used to go to the next search result, only works in a search editor. It has these context keys:
hasSearchResult || inSearchEditor
Are you using it in a separate search editor? It does work there. Here is one way to open a Search Editor:
If you are using the Find widget then use either of these:
Enter when focus is still in the Find widget or F3 when focus is in the editor.
If you are doing a search across files, then just a downarrow will go to the next result.
Using the command "Shift-Tab" does not work in Google Colab. Does anyone know an alternative that can be used?
I tried using shift + tab during the command and after a parenthesis after the command. For example, it was used at "print" and then again at "print("
On Colab, for SHIFT+ TAB to work, you have to disable Automatically trigger code completions on Tools->Settings.
You also have to have already imported the library that you are trying to get the docstring. For example run the import in another code snippet.
All Shortcuts can be found using CTRL + MH or going to Tools->Keyboard Shortcuts
Add a ? character and run the cell. Example:
You can see the docstring also just pressing TAB on Colab.
e.g.: print( + TAB
If it doesn't work, disable the Automatically trigger code completions by going to Tools->Settings->Editor
The shortcut for showing the docstring on Colab is ALT+/
Is it possible to use J and K when choosing a suggested auto-completion item? See the image below: I'd like to, maybe hold ALT or SHIFT (or in some other way differentiate between moving and typing), and use J and K to select the proper suggestion.
Is anything similar also available for moving around the menus (in Project view etc.)?
I was able to make this work by creating a shortcut ALT+J mapped to the Down key and ALT+K to the Up key.
You can move up and down in the popup without needing to move your hand away from HJKL to the arrow keys.
This also works in the Find in path window, though it does not work in the navigation menu.
Update: For Alt + K to work in the Find window since the version 2020+, one has to disable mnemonics in Settings, under Appearance & Behaviour -> Appearance -> Disable mnemonics in controls.
#Rok Povsic's solution is great and I used it a bit, but in some pop up menus like Intention actions, refactoring menu or usages the trick won't work.
So I used this Power Toys program from Microsoft to remap the Alt+J, Alt+K, Alt+H, Alt+L to arrow keys at windows level and now this works great everywhere around the IDE.
You can even specify only the app in which you want to override this shortcuts. For example for rider it will be "rider64.exe". You can find the name of the app you want to use in task manager under "Details".
I'm new to this site and pretty new to programming. I just got a new laptop, and I immediately installed Atom on it to edit HTML and Java. For some reason, the CTRLALTUp key that I was familiar with doesn't add the above (or below) lines as selection...I've already disabled the windows screen orientation shortcut that conflicts, and when I CTRLALT + Click I can still add to selection, but it's very annoying with a trackpad and when the item is directly above, where using up arrow would be much easier.
I also attempted to create an alternate shortcut, SHIFTALTUp but I had no idea how to name it:
'alternate-select-up':
'shift-alt-up': 'editor:add-selection-above'
If you are using Atom on Windows, the default keybinding for adding selection above is Alt+Ctrl+Up and for adding selection below is Alt+Ctrl+Down.
If that is not working and you prefer to use Alt+Shift+Up for adding selection above and Alt+Shift+Down for adding selection below you can add the following lines to your keymap.cson file:
'atom-text-editor':
'alt-shift-up': 'editor:add-selection-above'
'alt-shift-down': 'editor:add-selection-below'
You can open the keymap.cson file on File->Open Your Keymap.
Because it's conflicting with native shortcut. Here's a workaround that was ok for me, add in ~/.atom/keymap.cson:
'atom-text-editor':
'alt-shift-k': 'editor:move-line-up'
'alt-shift-j': 'editor:move-line-down'
'ctrl-shift-up': 'editor:add-selection-above'
'ctrl-shift-down': 'editor:add-selection-below'
Everyone knows that when you select some text in IntelliJ and press Ctrl+w your selection is expanded.
However,
you're kinda stuck on the presets for this:
when you have following code:
<a4j:commandButton execute="#form" render="tableProperties"
value="#{cjr_main.addExtractType}"
action="#{ExtractTypesBean.addExtractType()}"
styleClass="bigButton"
oncomplete="setLineAdded();"/>
and "Line" is selected but the method setLineAdded() is not yet defined you'd want "setLineAdded()" to be selected after hitting ctrl+w a couple of times.
However
Once "setLineAdded" is selected, and you press ctrl + w the whole tag is selected in stead of the accompanying "()"'s...
Is there a way to get this behavior?
(without writing a whole IntelliJ plugin just for this?)
best regards,
S.
No, the behavior of extend selection is controlled by code and is not configurable by users. You can indeed write a plugin to change the behavior.