mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-08-17 00:00:26 +03:00
fixes #1576 and showcmd configuration option
This commit is contained in:
parent
68137e91eb
commit
50c7b86b1f
@ -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`)
|
||||
|
@ -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 '_'",
|
||||
|
@ -208,6 +208,11 @@ class ConfigurationClass {
|
||||
*/
|
||||
showcmd = true;
|
||||
|
||||
/**
|
||||
* Display mode name text on status bar?
|
||||
*/
|
||||
showmodename = true;
|
||||
|
||||
/**
|
||||
* What key should <leader> map to in key remappings?
|
||||
*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user