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

Better support for vi-mode indicator #45

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

smh
Copy link
Contributor

@smh smh commented Mar 11, 2017

When using this prompt with vi keybindings, the mode-indicator is prepended to the first line of the prompt.

This will put the mode-indicator at the start of the second line, before the '❯' character.

@rafaelrinaldi
Copy link
Collaborator

rafaelrinaldi commented Dec 20, 2017

@smh Thank you for adding this and sorry for the late response. Would you be willing to rebase this PR (#45) and #46 against master so we can release it?

@smh
Copy link
Contributor Author

smh commented Dec 21, 2017

@rafaelrinaldi no worries. Both rebased now. Love this prompt, but can't live without vi 😄

@smh
Copy link
Contributor Author

smh commented Jan 28, 2018

@rafaelrinaldi bump

@@ -151,7 +151,10 @@ function fish_prompt
set prompt $prompt $pure_color_gray(basename "$VIRTUAL_ENV")"$pure_color_normal "
end

set prompt $prompt "$color_symbol$pure_symbol_prompt$pure_color_normal "
# vi-mode indicator
set mode_indicator (fish_default_mode_prompt)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a default value for fish_default_mode_prompt? If not specified, would this break the prompt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

# vi-mode indicator
set mode_indicator (fish_default_mode_prompt)

set prompt $prompt "$mode_indicator$color_symbol$pure_symbol_prompt$pure_color_normal "
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we could finally isolate this into its own function since we're doing all sorts of things to it now.
No need to do it in this PR, just a note.

@rafaelrinaldi
Copy link
Collaborator

This looks great to me as is. Merging it in as well.

Thanks a lot @smh!

@rafaelrinaldi rafaelrinaldi merged commit 0e28aa0 into pure-fish:master Jul 10, 2018
@rafaelrinaldi rafaelrinaldi mentioned this pull request Jul 10, 2018
edouard-lopez pushed a commit that referenced this pull request Aug 21, 2023
Better support for vi-mode indicator
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.

None yet

2 participants