Config
Learn how to configure CursorPlus.
All CursorPlus configuration options are prefixed with cursorPlus.
RevealConfig
- Key:
- Value:
object
- Description: Controls the reveal range when moving the cursor
- Settings:
key | value | default | description |
---|---|---|---|
offset | number | 10 | Minimum number of characters to show on the left |
threshold | number | 20 | Show from line start if cursor position is less than this value |
ExamplesRevealConfig
SettingsExamplesRevealConfig
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:
- Value:
object
- Description: Automatically insert text when you type an alias, without having to press
Enter
- Keys:
key | value | default | description |
---|---|---|---|
enabled | boolean | true | Enable/disable auto-insert behavior |
escapeChar | string | "/" | Start text with this character to prevent auto-insert |
all | array | - | 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):
key | value | default | description |
---|---|---|---|
text | string | - | Text to insert when the alias is typed. |
alias | string | - | Text alias. |
ExamplesAuto InsertConfig
SettingsExamplesAuto InsertConfig
AliasesConfig
- Key:
- Value:
object
- Description: Define aliases for commands to quickly select them from the quick-pick menu without searching or pressing Enter
- Keys:
key | value | default | description |
---|---|---|---|
global | object | - | 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
Saved CommandsConfig
- Key:
- Description: Define which command groups to save for repeating with the
cursorPlus.last
command - Type:
key | value | default | description |
---|---|---|---|
cursorPlus.savedCommands | array | ["move", "select"] | Array of command groups to save for repeating with last |
└─ <array-items> | - | A command group name or "runCommands" |
ExamplesSaved CommandsConfig
SettingsExamplesSaved CommandsConfig
Hidden MessagesConfig
- Key:
- Description: Prevent the extension from showing certain messages
- Type:
key | value | default | description |
---|---|---|---|
cursorPlus.hiddenMessages | array | ["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.