I want to disable the Ctrl+up, Ctrl+down to "increase/decrease number by 1" feature introduced by Emmet plugin, and would like to have the default behavior - move line up/down by 1 line - back.
This is how the keyboard shortcut defined in preference > package settings > Emmet > key bindings - default:
{
"keys": ["ctrl+up"],
"args": {"action": "increment_number_by_1"},
"command": "run_emmet_action",
"context": [{"key": "emmet_action_enabled.increment_number_by_1"}]
},
I added this in the preference > package settings > Emmet > key bindings - user:
{
"keys": [""],
"args": {"action": "increment_number_by_1"},
"command": "run_emmet_action",
"context": [{"key": "emmet_action_enabled.increment_number_by_1"} ]
},
But this didn't overwrite the original Emmet setting. How should I disable this?
Navigate to Preferences > Package Settings > Emmet > Settings – User.
Add the following to the file and save it:
{
"disabled_keymap_actions": "increment_number_by_1, decrement_number_by_1"
}
Related
Anyone notice that the default ctrl+tab doesn't work like the typical consecutive tab switching from left to right, e.g., in Chrome? I'm trying to switch to the next adjacent tab, but it seems to jump around (alphabetic order I think).
How can I change the order in which sublime switches tabs?
The default behavior is to goto tab you have used at last. Just add this keybinding to your user keybindings:
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
In sublime text 3, there is shortcut to switch tab in similar to ctrl+tab in browser.
{ "keys": ["ctrl+pagedown"], "command": "next_view" },
{ "keys": ["ctrl+pageup"], "command": "prev_view" },
While this ctrl+tab has behavior similar to windows alt+tab to switch apps. CMIIW.
{ "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },
You can just make custom key binding and swap them around.
And for anyone looking for shortcut to move tab to left & right, there is a plugin for that.
please try command + shift + ] .This will bring you immediately to the next tab.
Command + Ctrl + P : Switch between the projects that are listed on the sublimeText Sidebar.
I want to create a custom key binding to trigger the Tools > Snippets overlay. I know sublime uses the show_overlay command and overlay enum, but after trial an error I can't figure out what to set the enum to.
{
"keys": ["shortcut"],
"command": "show_overlay", "args": {"overlay": "some_unknown_command"}
}
I'm not looking to insert a specific snippet, just trigger the overlay.
You can find the command by entering sublime.log_commands(True) in the ST console, then using the menu to display the overlay. It will give you the arguments and command you need to use.
{
"keys": [ <your keys here> ],
"command": "show_overlay",
"args": {
"overlay": "command_palette",
"text": "Snippet:"
}
}
I want to find the command for "Replace" (from the "Find in Files" panel) so that I can assign a keyboard shortcut to it.
Normally I can use sublime.log_commands(True) in the Console Ctrl ` to identify the command, but the Console and Find in Files panels appear on top of each other; so I can't read the Console while I'm using Find in Files.
Control + Alt + Enter
From the default key bindings:
{ "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
}
In Sublime Text we can change key bindings for our needs. But I can't find way to overwrite basic binding for unfold functionality. I have next code in my Key bindings - User file:
{ "keys": ["ctrl+keypad4"], "command": "fold" },
{ "keys": ["ctrl+keypad5]"], "command": "unfold" },
ctrl+keypad4 works as expected, but binding for ctrl+keypad5 not work at all. How to fix it?
I don't want to change global keymap.
You have an extra close bracket in there. It should be:
{ "keys": ["ctrl+keypad5"], "command": "unfold" },
I recently started using Vintage mode in Sublime Text 2. I also enable Ctrl Keys support by adding "vintage_ctrl_keys": true in my configuration file.
However, this affect my workflow because I am using ctrl+[ and ctrl+] for indentation. Vintage mode basically remap ctrl+[ as escape.
Is there an easy way to disable ctrl+[ mapping in vintage mode ? I am still using ctrl+f and ctrl+b for scrolling.
You could disable vintage_ctrl_keys and set key bindings for Ctrl+F and Ctrl+B for page scroll:
{ "keys": ["ctrl+b"], "command": "move", "args": {"by": "pages", "forward": false} },
{ "keys": ["ctrl+f"], "command": "move", "args": {"by": "pages", "forward": true} }