diff --git a/README.md b/README.md index 53eae63d..ad35ba91 100644 --- a/README.md +++ b/README.md @@ -369,6 +369,10 @@ Vim settings are loaded in the following sequence: * Show the text of any command you are in the middle of writing. * Type: Boolean (Default: `true`) +#### `"vim.showmodename"` +* Show the name of the current mode in the statusbar. +* Type: Boolean (Default: `true`) + #### `"vim.textwidth"` * Width to word-wrap to when using `gq`. * Type: number (Default: `80`) diff --git a/package.json b/package.json index 5ca5995e..26fa91b7 100644 --- a/package.json +++ b/package.json @@ -400,6 +400,11 @@ "description": "Show the text of any command you are in the middle of writing.", "default": true }, + "vim.showmodename": { + "type": "boolean", + "description": "Show the name of the current mode in the statusbar.", + "default": true + }, "vim.iskeyword": { "type": "string", "description": "keywords contain alphanumeric characters and '_'", diff --git a/src/configuration/configuration.ts b/src/configuration/configuration.ts index 225f4b4e..bc4ffda4 100644 --- a/src/configuration/configuration.ts +++ b/src/configuration/configuration.ts @@ -208,6 +208,11 @@ class ConfigurationClass { */ showcmd = true; + /** + * Display mode name text on status bar? + */ + showmodename = true; + /** * What key should map to in key remappings? */ diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index be9c6981..9c6b23ca 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -2008,7 +2008,20 @@ export class ModeHandler implements vscode.Disposable { ? 'Recording @' + this._vimState.recordedMacro.registerName : ''; - const statusBarText = [modeText, this._createCurrentCommandText(), macroText].join(' '); + // Create status bar text + let statusBarTextArray = []; + + if (Configuration.showmodename) { + statusBarTextArray.push(modeText); + } + + if (Configuration.showcmd) { + statusBarTextArray.push(this._createCurrentCommandText()); + } + + statusBarTextArray.push(macroText); + + const statusBarText = statusBarTextArray.join(' '); this.setStatusBarText(statusBarText); }