You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with YAML files (specifically usually for Ansible), I often will double click on a text entry, then type "{{ which will erase the text name. The space is habit from "{{ which then autopopulates }}" - completely awesome. So the process I have to go through now is to highlight the text, add "{{, arrow, space, ctrl-arrow, space that could be simplified. The space in between the braces and the variable name is the best practice on Ansible. It is part of the default ansible-lint rules as well.
The text was updated successfully, but these errors were encountered:
If you highlight the var_to_debug and then press " it will add the quotes around the whole thing. Then you enter {{ it will continue to add the closing items as well. The next step is to add the space between the braces and the var name. This is where VS Code then erases and enters a space instead of adding a space in a similar fashion.
aeschli
changed the title
YAML Files - When highlighted text, have spacebar insert space like the double quotes or braces do
[yaml] add space to surrounding pairs
Jan 8, 2021
Ah, I see, you want surround the selected word with a space.
That doesn't fit well in the surrounding pairs feature which is single character base. Adding space to the surrounding pairs would solve your request but interfere with normal editing and add an inconsistency with other languages. I'm therefore closing the issue as we don't want to go that way.
However, there are multiple extensions that help with surrounding. Search for surround in the market place.
When working with YAML files (specifically usually for Ansible), I often will double click on a text entry, then type
"{{
which will erase the text name. The space is habit from"{{
which then autopopulates}}"
- completely awesome. So the process I have to go through now is to highlight the text, add"{{
, arrow, space, ctrl-arrow, space that could be simplified. The space in between the braces and the variable name is the best practice on Ansible. It is part of the default ansible-lint rules as well.The text was updated successfully, but these errors were encountered: