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.
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.
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.
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"} }
If my cursor is placed after an html closing tag and I press enter, I get a popup auto-completion suggestion as follows:
p> (element)
If I press enter again p> is printed on the screen.
This is annoying and I want to prevent it but how? I have already tried setting auto_complete to false in user preferences but that did not work.
There is complete description for Auto Completion on there site as
Disabling Auto Complete
Auto complete can be disabled with the auto_complete setting. To disable it, add this line to Preferences/File Settings - User:
"auto_complete": false
If auto complete is disabled, the completion popup can be shown manually, or tab can be used to insert the highest ranking completion without showing the popup.
Manually Showing Completions
Pressing Ctrl+Space will show the completion popup if it's not currently showing. If it is showing, it'll select the next item.
Commit on Tab
By default, the selected item in the completion popup will be committed when enter is pressed. This can create ambiguity between committing the completion, and inserting a newline. By setting the auto_complete_commit_on_tab setting to true, enter will insert a newline, and tab will commit the current completion. There are other benefits, too: because Sublime Text knows there is no ambiguity, it will show a more curated list of completions, with the one you want more likely to be in first place.
Enabling Commit on Tab is recommended, but it will take a short time to get used to.
Source :Sublime 2 Auto Complete
Hope this helps.
Answer in short (worked for me): Remove SublimeCodeIntel package.
After searching some more, I found that this is actually a long standing problem (7 months). The problem is posted on github as issue #279 and issue #359. Still not sure how to fix it exactly though (Without removing the package).
Long answer:
I was having the same problem you describe and it also annoyed me.
For me the problem was coming from the SublimeCodeIntel package that I installed in Sublime Text, so I guess you also have this package installed, causing this problem. I'm using ST version 3, but I guess there should be no difference to version 2 regarding this issue.
Although the answer by Jatin seems to be a work-a-round, (disabling the auto_complete will just mask the problem, what if you want to keep auto_complete on true), when I actually set auto_complete to false, I was still getting the auto_complete pop-up. After some thought, my guess was because of the SublimeCodeIntel package I had installed.
So I removed the SublimeCodeIntel package and behold, no popup auto-completion with the "p> (element)" suggestion.
Of course, removing SublimeCodeIntel may also seem a bit of a drastic solution. Maybe the package can be configured in such a way that the problem does not occur any more. I haven't looked into the problem why SublimeCodeIntel displays this incorrect auto complete suggestion. It might be good to send a bug report to the author of the package? (At the moment I'm happy enough to just remove the package)
You can disable the languages that CodeIntel autocompletes for.
The default setting is:
"codeintel_enabled_languages":
[
"JavaScript", "SCSS", "Python", "HTML",
"Ruby", "Python3", "XML", "Sass", "HTML5", "Perl", "CSS",
"Twig", "Less", "Node.js", "TemplateToolkit", "PHP"
],
Override the settings in your User Settings by removing the HTML and HTML5 items (paste this into your User Settings: Go to Preferences -> Package Settings -> SublimeCodeIntel -> Settings - User):
{
"codeintel_enabled_languages":
[
"JavaScript", "SCSS", "Python",
"Ruby", "Python3", "XML", "Sass", "Perl", "CSS",
"Twig", "Less", "Node.js", "TemplateToolkit", "PHP"
]
}