VS studio's shortcut is Alt+Click. But my Alt button doesnt work
How can i switch that shortcut to Ctrl+Click?
I didnt find that shortcut in settings, maybe there is one more way to do it?
No, there is no way to reconfigure this, though it was being discussed on this github issue.
However, there are other ways to add multiple cursors (which is what alt+click does in Visual Studio Code), though they aren't exactly what you are looking for. These are the default keybindings for the commands that add cursors:
{ "key": "ctrl+alt+up", "command": "editor.action.insertCursorAbove",
"when": "editorTextFocus" },
{ "key": "shift+alt+i", "command": "editor.action.insertCursorAtEndOfEachLineSelected",
"when": "editorTextFocus" },
{ "key": "ctrl+alt+down", "command": "editor.action.insertCursorBelow",
"when": "editorTextFocus" },
Related
My JupyterLab version is 3.5.0. I want the shortcuts to be similar with vscode, and customize them at the following path (on Mac)
~/.jupyter/lab/user-settings/#jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings
but each time reopen JupyterLab, this file shortcuts.jupyterlab-settings will be overwritten, and the disabled shortcuts will be added back automatically.
For example, the disabled key
"command": "notebook:change-cell-to-markdown",
"keys": [
"M"
],
"selector": ".jp-Notebook:focus",
"disabled": true
},
will be replaced by
{
"args": {},
"command": "notebook:change-cell-to-markdown",
"keys": [
"M"
],
"selector": ".jp-Notebook:focus"
},
The following screenshot shows the differences: the LHS is my settings, and the RHS is the file shortcuts.jupyterlab-settings overwritten by JupyterLab.
How to prevent this behaviour?
I'm very used to IntelliJ IDEA's family keybinding (PyCharm, WebStorm, RubyMine...).
How can I configure Sumblime Text 3 to use those shortcuts?
I've been googling and I can't find anything! But I don't think I'm the only one needing this. Thank you :)
Sublime Text 3 - User Key Bindings (IntelliJ IDEA Style) - Windows
[
{ "keys": ["ctrl+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
{ "keys": ["shift+alt+up"], "command": "swap_line_up" },
{ "keys": ["shift+alt+down"], "command": "swap_line_down" }
]
found the answer here.
Following the instruction to create custom shortcuts in Jupyter Lab, I've got the hide and show work but not the one to clear cell output (the first command entry). Does anyone know what the issue is? Thank you!
{
"shortcuts": [
{
"command": "notebook:clear-cell-outputs",
"keys": [
"Ctrl L"
],
"selector": ".jp-Notebook:focus"
},
{
"command": "notebook:hide-cell-outputs",
"keys": [
"O"
],
"selector": ".jp-Notebook:focus"
},
{
"command": "notebook:show-cell-outputs",
"keys": [
"Shift O"
],
"selector": ".jp-Notebook:focus"
}
]
}
The correct command to use is notebook:clear-cell-output (no "s" at the end). The complete command list can be found here.
What is the keyword to specify the "command" button for mac?
I want to be able to press "command+t" to open a new tab, for instance.
What do I type into the keybindings file?
This doesn't work.
[
{ "keys": ["command+t"], "command": "new_tab" },
]
The proper key designation for the ⌘ key in OS X as well as the Windows key on other keyboards is super. So,
[ { "keys": ["super+t"], "command": "new_tab" }, ]
would be your key binding.
You can find the key binding reference here.
I have added following piece of code to Preferences > Key Bindings - User configruation file in my Sublime Text 3:
{ "keys": ["ctrl+b"], "command": "insert_snippet", "args": {"contents": "<strong>${0:$SELECTION}</strong>"} },
As a result, when user presses Ctrl+B in editor, current selection is surrounded with HTML tags <strong> and <strong>.
Is there anyway, I can make this setting file-type depended? I.e. if user is working in *.txt or *.md file, then pressing Ctrl+B in editor should surround selection with Markdown bold tag (**) and, when editing any other type of file (in general or *.html files in particular), then to surround with HTML tags, as in above example.
Is this possible in Sublime Text 3?
This can be done with the context parameter:
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "source.php"
}
]
selector Returns the name of the current scope.
operator Type of test to perform against key‘s value. Defaults to equal.
operand The result returned by key is tested against this value.
More help see: http://docs.sublimetext.info/en/latest/reference/key_bindings.html
Examples
For recognizing Ctrl+B in HTML only
// bold snippet for html
{
"keys": ["ctrl+b"],
"command": "insert_snippet",
"args": {"contents": "<strong>${0:$SELECTION}</strong>"},
"context": [
{"key": "selector", "operator": "equal", "operand": "text.html.basic"}
]
},
For recognizing Ctrl+B in Markdown and plain text:
// bold snippet for markdown and plain text
{
"keys": ["ctrl+b"],
"command": "insert_snippet",
"args": {"contents": "**${0:$SELECTION}**"},
"context": [
{"key": "selector", "operator": "equal", "operand": "(text.html.markdown, text.plain)"}
]
},