-
Notifications
You must be signed in to change notification settings - Fork 131
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
Conversation
fd00c37
to
f6b506f
Compare
@rafaelrinaldi no worries. Both rebased now. Love this prompt, but can't live without vi 😄 |
@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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is part of fish-shell: https://github.com/fish-shell/fish-shell/blob/master/share/functions/fish_default_mode_prompt.fish
# vi-mode indicator | ||
set mode_indicator (fish_default_mode_prompt) | ||
|
||
set prompt $prompt "$mode_indicator$color_symbol$pure_symbol_prompt$pure_color_normal " |
There was a problem hiding this comment.
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.
This looks great to me as is. Merging it in as well. Thanks a lot @smh! |
Better support for vi-mode indicator
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.