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

Make vim.statusbarcolors only affect the mode string. #1839

Closed
ghost opened this issue Jun 14, 2017 · 4 comments
Closed

Make vim.statusbarcolors only affect the mode string. #1839

ghost opened this issue Jun 14, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 14, 2017

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

Currently the extension changes the colour of the whole status bar. It would be great to have an option to just change the mode string.

@xconverge
Copy link
Member

What do you mean? Do you mean only change the color there or the actual text?

@ghost
Copy link
Author

ghost commented Jun 14, 2017

Something like this:

vim-mode

@ghost
Copy link
Author

ghost commented Jun 14, 2017

I did a quick patch to out/src/mode/modeHandler.js:

setStatusBarText(text) {
    if (!ModeHandler._statusBarItem) {
        ModeHandler._statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
    }
    ModeHandler._statusBarItem.text = text || '';
    if (this._vimState.currentModeName().toLowerCase() === 'insert' || this._vimState.currentModeName().toLowerCase() === 'replace') {
        ModeHandler._statusBarItem.color = 'red';
    }
    else if (this._vimState.currentModeName().toLowerCase().startsWith('visual')) {
        ModeHandler._statusBarItem.color = 'orange';
    }
    else {
        ModeHandler._statusBarItem.color = 'white';
    }
    ModeHandler._statusBarItem.show();
}

From reading the VS Code API docs, you can only set the foreground colour. :-(

@jpoon
Copy link
Member

jpoon commented May 6, 2019

Closing this issue given the age of the bug and the lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants