VS code+JavaScript shortcut for end line with a semicolon and go to the next line

后端 未结 3 1104
抹茶落季
抹茶落季 2021-01-06 13:53

Here is example of what I want to do:

I used Ctrl+Shift+T in WebStorm but now I\'m stuck with finding the equal shortcut at

相关标签:
3条回答
  • 2021-01-06 14:26

    You can install the Auto Insert Semicolon extension.

    Work fine for me.Shortcut: alt+enter

    0 讨论(0)
  • 2021-01-06 14:27

    I think you will need to set up a macro for that, it isn't built-in. See vscode macro extension.

    And this in your settings:

    "macros": {
    
        "insert semicolon and goto next line": [
    
            "cursorLineEnd",
            {
              "command": "type",
              "args": {
                "text": ";"
              }
            },
            "editor.action.insertLineAfter"
        ]
    }
    

    Set up a keybinding for that:

    {
      "key": "ctrl+shift+;",
      "command": "macros.insert semicolon and goto next line"
    },
    
    0 讨论(0)
  • 2021-01-06 14:39

    I had the same issue and I solved with the shortcut Ctrl+Enter

    0 讨论(0)
提交回复
热议问题