vscode-as3mxml
vscode-as3mxml copied to clipboard
MXML should automatically add close tag when open tag is finished and not self-closing
Moved to separate issue: #39
~~~2) would be nice to have the following: when typing / at the end of an MXML tag I'd like to get /> instead~~~
Moved to separate issue: #40
3) when typing > at the end of an MXML tag I'd like to get the second closing tag inserted automatically. Ideally, the closing tag already 2 lines down and the cursor indented on the line between:
<s:VGroup id="whatever">
......
</s:VGroup>
Just my 2 cents.
-
This would be nice. I will look into it. I know that I can add the quotes, but I'll need to check if I can change the position of the cursor to go between the quotes.
-
VSCode does not do this for normal XML. I am hesitant to go against the platform's default behavior. I can give it a try, but I may find that there are weird edge cases.
-
VSCode also does not do this for normal XML. It's also probably more tricky than the last one, and I suspect that the APIs may not be robust enough to do it yet.
- great thanks.
- ok.
- well, would be nice (got the idea from IntelliJ). However, no biggy since there's the extension "XML Tools" that automatically closes the last open tag via a keyboard shortcut.
- for this point some simple snippets could insert the ="" and place the cursor between the quotes:
id="" : "id=""": { "prefix": "id", "body": [ "id="$1"" ]},
paddingLeft="" : "paddingLeft=""": { "prefix": "pl", "body": [ "paddingLeft="$1"" ]},
Oops. Took out the backslashes. Here it goes again marked as code:
id="" :
"id=\"\"": { "prefix": "id", "body": [ "id=\"$1\"" ]},
paddingLeft="" :
"paddingLeft=\"\"": { "prefix": "pl", "body": [ "paddingLeft=\"$1\"" ]},
- This appears to be something that Microsoft is working on, but it is currently disabled:
https://github.com/Microsoft/vscode/blob/1.7.1/extensions/xml/xml.language-configuration.json#L20
I'm guessing that this will come for free in a future update because MXML is still considered XML by VSCode.
Looks like it. Good to know. Thanks.
- Christian
On Dec 2, 2016, at 5:58 PM, Josh Tynjala [email protected] wrote:
• This appears to be something that Microsoft is working on, but it is currently disabled: https://github.com/Microsoft/vscode/blob/1.7.1/extensions/xml/xml.language-configuration.json#L20
I'm guessing that this will come for free in a future update.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
This is supported by https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag when you add mxml
to the list of languages in the auto-close-tag.activationOnLanguage
setting.