macros icon indicating copy to clipboard operation
macros copied to clipboard

Cannot change language mode

Open gormac opened this issue 6 years ago • 4 comments

As mentioned in the comments of issue #14 by @martin-tarjanyi:

I would like to have a macro to change the language mode to Json and format the document according to that. However, I'm not able to provide an input for this command automatically.

"macros": {
    "formatJson": [
        {"command": "workbench.action.editor.changeLanguageMode", "args": {"id": "json"}},
        "editor.action.formatDocument"
    ]
}

gormac avatar Apr 13 '18 08:04 gormac

I would like to do the same with XML, when you copy them text from logs or similar, it would help... I'm doing it many times a day..

elcasa avatar Oct 24 '18 12:10 elcasa

Not sure if it'll help but I just wrote and extension to change language from a keybinding: https://marketplace.visualstudio.com/items?itemName=usernamehw.change-language-mode

usernamehw avatar Dec 20 '18 18:12 usernamehw

@gormac a year passed, still not working using your code, I don't know why macros is so hard to use in vs code.

sublime can easily record macros and play it by keybinds.

in vs code ,you need to struggle in editing the macros by hand editing, and facing so much problems.

mask2012 avatar Jul 31 '19 09:07 mask2012

@mask2012 Last commit was in late 2017. This appears to be a dead repository.

gormac avatar Jul 31 '19 09:07 gormac