Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: status bar vim mode configuration #9216

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,56 @@
"vim.langmap": {
"type": "string",
"description": "Language map for alternate keyboard layouts. When you are typing text in Insert (or Replace, etc.) mode, the characters are inserted derectly. Otherwise, they are translated based on the provided map."
},
"vim.statusBarText.normal": {
"type": "string",
"description": "Text to display in the status bar when in Normal mode.",
"default": "-- NORMAL --"
},
"vim.statusBarText.insert": {
"type": "string",
"description": "Text to display in the status bar when in Insert mode.",
"default": "-- INSERT --"
},
"vim.statusBarText.visual": {
"type": "string",
"description": "Text to display in the status bar when in Visual mode.",
"default": "-- VISUAL --"
},
"vim.statusBarText.visualBlock": {
"type": "string",
"description": "Text to display in the status bar when in Visual Block mode.",
"default": "-- VISUAL BLOCK --"
},
"vim.statusBarText.visualLine": {
"type": "string",
"description": "Text to display in the status bar when in Visual Line mode.",
"default": "-- VISUAL LINE --"
},
"vim.statusBarText.replace": {
"type": "string",
"description": "Text to display in the status bar when in Replace mode.",
"default": "-- REPLACE --"
},
"vim.statusBarText.easyMotion": {
"type": "string",
"description": "Text to display in the status bar when in Easy Motion mode.",
"default": "-- EASYMOTION --"
},
"vim.statusBarText.easyMotionInput": {
"type": "string",
"description": "Text to display in the status bar when in Easy Motion Input mode.",
"default": "-- EASYMOTION INPUT --"
},
"vim.statusBarText.surroundInput": {
"type": "string",
"description": "Text to display in the status bar when in Surround Input mode.",
"default": "-- SURROUND INPUT --"
},
"vim.statusBarText.vimDisabled": {
"type": "string",
"description": "Text to display in the status bar when in Vim Disabled mode.",
"default": "-- VIM DISABLED --"
}
}
},
Expand Down
13 changes: 13 additions & 0 deletions src/configuration/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,19 @@ class Configuration implements IConfiguration {
replace: ['#000000', '#ffffff'],
};

statusBarText = {
normal: '-- NORMAL --',
insert: '-- INSERT --',
visual: '-- VISUAL --',
visualBlock: '-- VISUAL BLOCK --',
visualLine: '-- VISUAL LINE --',
replace: '-- REPLACE --',
easyMotion: '-- EASYMOTION --',
easyMotionInput: '-- EASYMOTION INPUT --',
surroundInput: '-- SURROUND INPUT --',
vimDisabled: '-- VIM: DISABLED --',
};

searchHighlightColor = '';
searchHighlightTextColor = '';

Expand Down
20 changes: 10 additions & 10 deletions src/statusBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,25 +171,25 @@ export function statusBarText(vimState: VimState) {
: '|';
switch (vimState.modeData.mode) {
case Mode.Normal:
return '-- NORMAL --';
return configuration.statusBarText.normal;
case Mode.Insert:
return '-- INSERT --';
return configuration.statusBarText.insert;
case Mode.Visual:
return '-- VISUAL --';
return configuration.statusBarText.visual;
case Mode.VisualBlock:
return '-- VISUAL BLOCK --';
return configuration.statusBarText.visualBlock;
case Mode.VisualLine:
return '-- VISUAL LINE --';
return configuration.statusBarText.visualLine;
case Mode.Replace:
return '-- REPLACE --';
return configuration.statusBarText.replace;
case Mode.EasyMotionMode:
return '-- EASYMOTION --';
return configuration.statusBarText.easyMotion;
case Mode.EasyMotionInputMode:
return '-- EASYMOTION INPUT --';
return configuration.statusBarText.easyMotionInput;
case Mode.SurroundInputMode:
return '-- SURROUND INPUT --';
return configuration.statusBarText.surroundInput;
case Mode.Disabled:
return '-- VIM: DISABLED --';
return configuration.statusBarText.vimDisabled;
case Mode.SearchInProgressMode:
return vimState.modeData.commandLine.display(cursorChar);
case Mode.CommandlineInProgress:
Expand Down