How to auto insert spaces between double brackets (double mustache) in VS Code - visual-studio-code

Currently when I add { to a .html file, VS Code will automatically close that bracket while leaving the cursor between the brackets, same with double curly brackets. Since I am working with Angular I would like to know if it is possible to have VS Code do this:
If I add 2 open curly brackets then add 2 blank spaces between them, close the brackets and set cursor between the blank spaces.
So instead of this: {{|}} I would get {{ | }} where | represents the cursor.

"Spaces Inside Braces" seems to be the best bet currently.

Related

VSCode: Create two whitespaces between curly braces in CSS with cursor in the middle

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.

VSCode Inside Curly Braces indentation

Is there a setting in VSCode in handles the indents of any content inside curly braces. I currently have my tab size set to 4. But for some reason everything inside a curly brace in javascript only has about a 2 on spacing.
Something like this:
copy(tableType) {
this.selectElementContents(document.getElementById(tableType));
},
When in reality I want something like this:
copy(tableType) {
this.selectElementContents(document.getElementById(tableType));
},
Basically a more noticeable indent so anything inside curly braces. Anyone knows of a setting that handles this?

VS Code editor places cursor after commas/quotations

When I type a single comma or quotation mark in VS Code editor, the editor automatically adds a second one, which is OK, but than it places the cursor outside right after the commas, so if I need to write something between the commas (Which is normally the case...) I need to move the cursor back between the commas.
I would like to change this behavior and place the cursor automatically between commas or quotations.
Does anyone have an idea?

Select/delete word inside brackets which inside quotes

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.

Sublime Text 2 how to wrap selection with quotes/auto-pairing

I just switched from Textmate 2 to Sublime Text 2. I figured that typing single quotes or brackets would automatically generate a second quote or bracket with the cursor in between ("auto-pairing" is what they call it, Textmate2 does this by default) but this isn't happening.
I see that in the preferences->settings-Default there is some JSON configuration that would seem to be doing what I need but this is not the case. I haven't changed any of this default configuration.
Could someone help me add to my preferences->settings-User the configuration I need to enable auto-pairing for all the common tags, i.e., "'{[(?
Right now I'm working on a client's laptop and running Sublime Text 2 portable version from my flash drive. No additional packages installed, default settings. Everything works as expected:
When I type a single or double quote, brackets, square or curly brackets it adds a closing one and puts cursor in the middle.
When I select smth and press any of mentioned above keys it surrounds selection with pair of appropriate quotes or brackets.
Check your Settings>Default, look for this:
// Controls auto pairing of quotes, brackets etc
"auto_match_enabled": true,
It's near line 89 or so.
Not a direct answer to your question..but I have installed a few plugins in ST2 and auto-pairing works fine.
I am not sure which plugin is responsible for it. Let me know if you would like me to share the list of plugins.