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

Move Vim mode indicator to the left side of the status bar #22269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

helgemahrt
Copy link
Contributor

Addressed the first request on issue #14093, as discussed in #22048

Release Notes:

  • Improved Vim mode indicator visibility by moving it to the left of the status bar

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 19, 2024
@mrnugget
Copy link
Member

I'm not sure about this. I don't like that it moves the diagnostics & other messages when changing the mode.

screenshot-2024-12-20-14 34 33

@helgemahrt
Copy link
Contributor Author

We could make it fixed length. @ConradIrwin suggested it should go to the left of the diagnostics, so I’d like him to chime in here as well 😊

@danilo-leal
Copy link
Contributor

danilo-leal commented Dec 20, 2024

+1 to fix its width! And also, it'd be great to move this to the right of that divider that line. That's there to separate status bar controls that open up panels vs. other actions that do something else.

Edit: coming back here as I just read the discussion in the previous PR! The ideal layout I'm thinking of it is:

Screenshot 2024-12-20 at 6 45 50 PM

@maan2003
Copy link
Contributor

why are we doing -- NORMAL -- instead NORMAL

@0x2CA
Copy link
Contributor

0x2CA commented Dec 23, 2024

why are we doing -- NORMAL -- instead NORMAL

Vim is displayed like this.
Of course I think this should be configurable and allow different colors for different modes
These already have corresponding issues

@ConradIrwin
Copy link
Member

I had forgotten about the irritation that the vim mode indicator also changes size, causing the diagnostics to move about; so you can't easily stack either without causing the UI to jump unnecessarily.

If we want to move it to the left, we could try and ensure the indicator always has the same width:

  • -- NORMAL --
  • -- REPLACE--
  • -- INSERT --
  • -- VISUAL --
  • VISUAL LINE

Or we could abandon the plan of moving it, and note that although it's vim incompatible, putting it on the right avoids this problem...

@danilo-leal
Copy link
Contributor

Isn't that just a Label inside a ButtonLike component? Couldn't we pass in a fixed width that's just a bit bigger than the biggest label so that it doesn't dance/jump around? Something along these lines:

        div()
            .w_32()
            .child(
                Label::new(format!("{} -- {} --", pending, mode))
                    .size(LabelSize::Small)
                    .line_height_style(LineHeightStyle::UiLabel),
            )
            .into_any_element()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants