I came across a website that said that CTRL/⌘-SHIFT-J selects all similarly indented text in sublime; however this does not seem to be the case in the actual doc which says:
Added Expand Selection to Indentation (Command+Shift+J on OS X, and Ctrl+Shift+J on Windows and Linux)
Does anyone know the shortcut for this action? This would be really useful to me!
If you open your default key bindings (Preferences > Key Bindings - Default) you can search for "command": "expand_selection", "args": {"to": "indentation"} to see your set key binding.
The full thing looks like this in Linux:
{ "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} }
Related
I always find myself having at least 10 tabs open in VS Code. I easily get lost in all my tabs and I feel it kills productivity.
Is there a fast key binding to save and close a tab?
One way to save and close an editor at the same time would be with a macro. Using the multi-command macro extension, put this into your settings.json:
"multiCommand.commands": [
{
"command": "multiCommand.saveAndCloseEditor",
"sequence": [
"workbench.action.files.save",
"workbench.action.closeActiveEditor",
]
}
]
and I used this keybinding (keybindings.json):
{
"key": "ctrl+w",
"command": "-workbench.action.closeActiveEditor"
},
{
"key": "ctrl+w",
"command": "extension.multiCommand.execute",
"args": { "command": "multiCommand.saveAndCloseEditor" }
},
First, removing the default Ctrl+W which would close the current tab/editor - but if the file was dirty would stop to prompt to save.
Second, use the same Ctrl+W to trigger the macro. Now the editor is saved first and then closed at once with no prompt.
If you press Ctrl-f4 on unsaved editor, there will be a save-prompt.
You can check the keybindings in VSCode or in this manual https://code.visualstudio.com/docs/getstarted/keybindings
To increase productivity with opened tabs, I use stack-tabs so that the most recently opened tabs are moved to the left automatically. This is very useful to not get lost because the tabs you are working on are often the most recent.
I also use bookmarks to navigate more easily between the code.
I use the Pin feature to keep most important tabs at the left. Then I use alt + 1, alt + 2(, etc..) to quickly select the 1, 2(, etc..) tab at the left.
I use the command "Close All Editors" (#command:workbench.action.closeAllEditors) to close all unpinned tabs at once.
I have set shortcuts to Pin/Unpin & close a pinned tab so I can easily managed pinned tabs.
I have split my sublime window vertically to be able to view two files at once. In the explorer window, placed in the left side, it shows two groups, Group 1 which hold "file1" and Group 2 which holds "file2".
Is there a shortcut to change between these two files something like Ctrl + Tab (which only works with files from the current group) ? It's very frustrating to use Ctrl + 0 to point to the side bar and choose with Up Down and Enter.
I'm using Sublime Text 2.
Thanks in advance.
FIX
Actually I've created my own navigator shortcut. In Sublime Text, open Preferences -> Key Bindings - User and added:
[
{ "keys": ["alt+left"], "command": "prev_view"},
{ "keys": ["alt+right"], "command": "next_view"}
]
See this
Ctrl + Page-up && Ctrl + Page-down.
I use these to navigate.
None of these commands produce a response in Sublime Text 2 on Windows. Emmet is installed. Using vintage mode. Question: how to use Emmet in Vintage Mode on Sublime Text 2?
html:5
div>ul>li
div+p+bq
You can use Ctrl + E to manually expand an abbreviation.
You can also try adding the following to your User keybindings in order to make Tab work normally:
{ "keys": ["tab"], "args": {"action": "expand_abbreviation"}, "command": "run_emmet_action", "context": [{"key": "emmet_action_enabled.expand_abbreviation"}]}
I've installed latest sublime text 2 version today. I cannot make Control + ` work on 2 different PCs one on Windows 7 the other on Windows 8.1.
In the past I remember it did work.
So what's the alternative ?
Put this in Preferences/Key Bindings -- User and modify the shortcut to something that will work:
{ "keys": ["ctrl+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
By the way: isn't it possible that the second PC has different keyboard layout or that some program is globally overriding that shortcut? As far as I know this keybinding was not changed.
Something changed or is it a bug?
Today when i click ctrl+f, find something and press escape the panel is still open. Pressing escape do nothing.
In default bind i have:
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
"context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
Edit:
wow, better. I just discovered escape button doesn't work in sublime text in every case, every menu and places.
Edit2:
I restarted ST2 and nothing, restarted again and again. Now it's working. I don't have any idea what happend.
I had the same issue and solved it by closing Adobe Photoshop CS4.
sorry for my english. I try to explain.
I had this problem too. I fix it. Just override "escape" default key bindings in user keymap file to another key, for example "f1", save file, remove your changes, and save file again.