Home

Insert

Insert text at specific positions

Similar to the move commands but to insert text.

Available commandsInsert

Nameiddescription
Line StartcursorPlus.insert.lineStartInsert at start of line
Up Line StartcursorPlus.insert.upLineStart└─ in previous line
Down Line StartcursorPlus.insert.downLineStart└─ in next line
Text StartcursorPlus.insert.textStartInsert before first non-whitespace character
Up Text StartcursorPlus.insert.upTextStart└─ in previous line
Down Text StartcursorPlus.insert.downTextStart└─ in next line
Text EndcursorPlus.insert.textEndInsert after last non-whitespace character
Up Text EndcursorPlus.insert.upTextEnd└─ in previous line
Down Text EndcursorPlus.insert.downTextEnd└─ in next line
Line EndcursorPlus.insert.lineEndInsert at end of line
Up Line EndcursorPlus.insert.upLineEnd└─ in previous line
Down Line EndcursorPlus.insert.downLineEnd└─ in next line
WrappercursorPlus.insert.wrapperChoose an insert command from a quick-pick menu

Wrapper command?

Learn more in the Wrapper command documentation.

ArgsInsert

Each insert command (including the wrapper) takes these arguments:

keytypedefaultdescription
textstring-Text to insert
nextCommand-Command to execute after inserting the text

ExampleInsert

Keyboard shortcutExampleInsert

Here is a command that inserts a semicolon at line end followed by a line break:

keybindings.json
[
  {
    "key": "ctrl+shift+alt+;",
    "command": "cursorPlus.insert.lineEnd",
    "args": {
      "text": ";",
      "nextCommand": "insertLineBreak"
    }
  }
]

VideoExampleInsert

If you are interested on why to use nextCommand argument when runCommands command exists, please read this section.

ConfigurationInsert