I'm new to Emmet and to Sublime Text 3.
In ST3, when I type the left curly brace, the right curly brace is automatically inserted, which interferes with Emmet i.e. when I type something like a{Click Me}, it expands to a{Click <Me></Me>} instead of the expected Click Me. However, if I delete the right curly brace and type the text I want, then manually insert the right curly brace, it expands correctly.
Any idea how I can fix this? Which setting do I need to change, if any? It's driving me mad. ¬ ¬
You can:
move caret after auto-closed brace and expand abbreviation, or
type }.
Sublime Text is smart enough to not insert redundant brace.
Related
Sublime had that default behaviour that in the context of a CSS file when writing { it is autocompleted to {|} (the pipe only indicates the position of the cursor and is not an actual pipe-charakter).
Upon hitting the spacebar {|} was further autocompleted to { | } (the pipe again being the cursor).
How do I get this exact behaviour in VSCode? ....and only for the context of CSS files?
I don't want snippets or any other workaround. I want, with my cursor inside of two empty curly braces, to hit the spacebar and get two spaces between the braces and the cursor to end up right in the middle.
In code files, when I expand selection, brackets, quotes, and spaces are used to delimit "levels" of expansion.
However, when I'm working in plain text, expand selection ignores brackets and goes from selecting one word to then selecting a whole line.
Is there any way to have expand selection respect brackets and quotes in plain text files?
I have been using Ultraedit 16 for Perl editing.
I'm thinking about migrating to Notepad++ and gave it a try.
Here's how Ultraedit does highlighting. The cursor is on the last brace, and the matching first brace is highlighted:
Here's how Notepad++ highlights the same code. Cursor in the same place, but no highlight on the matching first brace.
I've looked through the configuration and searched elsewhere, it seems that the highlighting should be possible, but I'm not finding it.
Found it after more digging - Settings => Style Configurator => Global Styles => Brace Highlight style. I can set a background style there to make the matched brace more visible.
One possible result:
Is there a way to highlight brackets when the cursor is anywhere within the enclosing brackets? Default settings highlight it only when I place the cursor near the brackets.
Yes, there is now a way by default, in VSCode 1.40 (October 2019):
Improvements to bracket matching
Previously, VS Code would only highlight matching brackets when the cursor was next to a bracket character.
Now VS Code will always highlight enclosing brackets if they exist.
We have also adjusted our Go to Bracket and Select to Bracket actions to use enclosing brackets.
It is improved and supported natively with VSCode 1.60 (Aug. 2021):
Bracket pair colorization can be enabled by setting "editor.bracketPairColorization.enabled": true.
All colors are themeable and up to six colors can be configured.
VS Code only supports bracket matching when the cursor is near the opening or closing bracket. Maybe an extension would help highlight the enclosing brackets wherever you are in the code but I haven't been able to find one.
If you just want to quickly find matching brackets, braces, parens, etc. you could try Bracket Pair Colorizer or Rainbow Brackets.
Also maybe you will like VSCode extension "Blockman", it highlights nested code blocks. (I am the author of Blockman)
With release 1.60 (September 2021), VS Code now has bracket pair colorization built in, indicating all matching brackets by color.
This feature can be enabled by adding this line to settings.json:
"editor.bracketPairColorization.enabled": true
I am using Version: 1.63.2(MacOS). Default bracket highlight feature was not working for me. In case, someone face similar issue, set it true.
"editor.matchBrackets": true,
Small question about vim mode in PhpStorm. I have this strings
if ($newGroupName) {
echo "<h3>{ $t->groupName }</h3>";
echo '<div>';
}
I want to replace $t->groupName with newGroupName, what would be the correct shortcut? All shortcuts I've tried selects both lines between if brackets.
Use ci{ which means: change what inside the curly brackets
To change all inside next bracket you can add this on your .ideavimrc file:
nmap <leader>p f)ci(
the f) is to go on next )
then change all inside with ci(
note: if nothing is on the bracket you can just type i to Insert.