Home

Config

Learn how to configure CursorPlus.

All CursorPlus configuration options are prefixed with cursorPlus.

RevealConfig

  • Key: cursorPlus.reveal
  • Value: object
  • Description: Controls the reveal range when moving the cursor
  • Settings:
keyvaluedefaultdescription
offsetnumber10Minimum number of characters to show on the left
thresholdnumber20Show from line start if cursor position is less than this value

ExamplesRevealConfig

SettingsExamplesRevealConfig

settings.json
{
  "cursorPlus.reveal": {
    "offset": 10,
    "threshold": 20
  }
}

VideoExamplesRevealConfig

Notice that after running the cursorPlus.move.textStart command, the command reveals from the start of the line in the first 2 examples because the cursor position is less than 20 characters (threshold). While in the last example, it only reveals 10 characters (offset) to the left.

Auto InsertConfig

  • Key: cursorPlus.autoInsert
  • Value: object
  • Description: Automatically insert text when you type an alias, without having to press Enter
  • Keys:
keyvaluedefaultdescription
enabledbooleantrueEnable/disable auto-insert behavior
escapeCharstring"/"Start text with this character to prevent auto-insert
allarray-Array of texts to auto-insert for all insert commands
└─ <array-item>-Text to auto-insert for all insert commands
array-Array of texts to auto-insert for specific insert commands
└─ <array-item>-Text to auto-insert for specific insert commands

Auto Insert Item (object)Auto InsertConfig

  • key: No key (<array-item>)
  • Value: object
  • Description: Define text and its alias for auto-insertion
  • Keys (all required):
keyvaluedefaultdescription
textstring-Text to insert when the alias is typed.
aliasstring-Text alias.

ExamplesAuto InsertConfig

SettingsExamplesAuto InsertConfig

settings.json
{
  "cursorPlus.autoInsert": {
    "enabled": true,
    "escapeChar": "/",
    "lineEnd": [",", ";"]
  }
}

AliasesConfig

  • Key: cursorPlus.aliases
  • Value: object
  • Description: Define aliases for commands to quickly select them from the quick-pick menu without searching or pressing Enter
  • Keys:
keyvaluedefaultdescription
globalobject-Define aliases for all commands in a single place
└─ string-Alias for a specific command
object-Define aliases for commands in a specific group
└─ string-Alias for a specific command in the group

Aliases can conflict!

For more information, read How to avoid aliases conflicts.

ExamplesAliasesConfig

SettingsExamplesAliasesConfig

settings.json
{
  "cursorPlus.aliases": {
    "global": {
      "lineStart": "ls",
      "textStart": "ts",
      "textEnd": "te",
      "lineEnd": "le"
      // ...
    },
    "move": {
      "lineStart": "move-ls"
      // ...
    },
    "delete": {
      "entireLine": "el",
      "upEntireLine": "uel",
      "downEntireLine": "del"
      // ...
    }
    // ...
  }
}

Saved CommandsConfig

  • Key: cursorPlus.savedCommands
  • Description: Define which command groups to save for repeating with the cursorPlus.last command
  • Type:
keyvaluedefaultdescription
cursorPlus.savedCommandsarray["move", "select"]Array of command groups to save for repeating with last
└─ <array-items>-A command group name or "runCommands"

ExamplesSaved CommandsConfig

SettingsExamplesSaved CommandsConfig

settings.json
{
  "cursorPlus.savedCommands": ["move", "insert", "delete", "runCommands"]
}

Hidden MessagesConfig

  • Key: cursorPlus.hiddenMessages
  • Description: Prevent the extension from showing certain messages
  • Type:
keyvaluedefaultdescription
cursorPlus.hiddenMessagesarray["cursorPlus.move"]Array of messages to prevent from showing
└─ <array-items>-A message name to prevent from showing

Hideable MessagesHidden MessagesConfig

config-errorHideable MessagesHidden MessagesConfig

It's shown when the extension fails to parse the configuration.

If you see it, it's usually my fault, because I remove any invalid values from the configuration to guarantee that the parse always succeeds.

ExamplesHidden MessagesConfig

SettingsExamplesHidden MessagesConfig

settings.json
{
  "cursorPlus.hiddenMessages": ["config-error"]
}