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

Allow user to change status bar color based on mode #1529

Merged
merged 3 commits into from
Apr 19, 2017
Merged

Allow user to change status bar color based on mode #1529

merged 3 commits into from
Apr 19, 2017

Conversation

xconverge
Copy link
Member

@xconverge xconverge commented Apr 19, 2017

I am ok opening this now since it is off by default and behind a config flag. We can either wait on it or just release it now and change that single function in the future when vscode changes the way this is done...

fixes #1056

apr-18-2017 19-41-59

@xconverge
Copy link
Member Author

I changed the colors in the readme to be a bit darker vs the ones in the gif

@xconverge xconverge merged commit b8ac4cd into VSCodeVim:master Apr 19, 2017
@xconverge xconverge deleted the change-status-bar branch April 19, 2017 03:26
@xconverge
Copy link
Member Author

Merging this since it is pretty straight forward and behind a config flag!

@@ -216,6 +220,16 @@ class ConfigurationClass {
startInInsertMode = false;

/**
* Start in insert mode?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to update the docstring here. 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looking out for me :)

@@ -14,6 +14,10 @@ export interface IHandleKeys {
[key: string]: boolean;
}

export interface IStatusBarColors {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can actually do a more precise type here e.g.

interfcae IStatusBarColors {
    normal: string,
    visual: string,
    // ...
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For super mega bonus points you could use TypeScript's mapped types to ENSURE that every mode has a color by mapping from our ModeNames object. Sort of like this:

interface IStatusBarColors { [Key in keyof ModeNames]: string }

Mapped types are awesome.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes that is a good idea instead of string, string for sure

@johnfn
Copy link
Member

johnfn commented Apr 19, 2017

And the number of plugins we've implemented grows again... 😁

This is almost totally fine. I only have one problem...

....

...

YOUR COLOR SCHEME JESUS MAN HOW DO YOU WORK LIKE THAT

@xconverge
Copy link
Member Author

You have never used solarized dark?

@johnfn
Copy link
Member

johnfn commented Apr 19, 2017

Nah I'm on Monokai, which makes my IDE look like Sublime to the untrained eye...

@zelphir
Copy link
Contributor

zelphir commented Apr 28, 2017

It doesn't work on the latest version of insiders because workbench.experimental.colorCustomizations is not experimental anymore. Now it's just workbench.colorCustomizations.

Also the key names are different:

  "workbench.colorCustomizations": {
    "statusBar.background": "#5fb3b3",
    "statusBar.noFolderBackground": "#5fb3b3",
    "statusBar.debuggingBackground": "#5fb3b3",
  }

@MuneebRabaney
Copy link

MuneebRabaney commented May 7, 2022

I used this

    "vim.statusBarColorControl": true,
    "vim.statusBarColors.normal": ["#8FBCBB", "#434C5E"],
    "vim.statusBarColors.insert": "#BF616A",
    "vim.statusBarColors.visual": "#B48EAD",
    "vim.statusBarColors.visualline": "#B48EAD",
    "vim.statusBarColors.visualblock": "#A3BE8C",
    "vim.statusBarColors.replace": "#D08770",
    "vim.statusBarColors.commandlineinprogress": "#007ACC",
    "vim.statusBarColors.searchinprogressmode": "#007ACC",
    "vim.statusBarColors.easymotionmode": "#007ACC",
    "vim.statusBarColors.easymotioninputmode": "#007ACC",
    "vim.statusBarColors.surroundinputmode": "#007ACC",

taken from VS Market Place

It doesn't work on the latest version of insiders because workbench.experimental.colorCustomizations is not experimental anymore. Now it's just workbench.colorCustomizations.

Also the key names are different:

  "workbench.colorCustomizations": {
    "statusBar.background": "#5fb3b3",
    "statusBar.noFolderBackground": "#5fb3b3",
    "statusBar.debuggingBackground": "#5fb3b3",
  }

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change status bar color based on mode
5 participants