-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
Add vi-mode prompt info #32
Conversation
Thank you! |
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.
Amazing work! Thank you a lot!
I'm gonna merge, just do some fixes.
MODE_INDICATOR="${SPACESHIP_VI_MODE_NORMAL}" | ||
;; | ||
esac | ||
echo -n "${MODE_INDICATOR}" |
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.
Would be great if the indicator will be highlighted as white bold. What do you think?
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.
Yeah, I agree.
@@ -250,3 +276,4 @@ export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40 | |||
# Zsh to use the same colors as ls | |||
# Link: http://superuser.com/a/707567 | |||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} | |||
|
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.
Please, remove this extra trailing line.
@@ -210,6 +215,26 @@ spaceship_ruby_version() { | |||
echo -n "%{$reset_color%}" | |||
} | |||
|
|||
# Show current vi_mode mode | |||
spaceship_vi_mode() { |
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.
Can you please add this function (you've already mentioned):
function zle-keymap-select() { zle reset-prompt; zle -R; };
zle -N zle-keymap-select;
bindkey -v
I think, that would be useful for debugging purposes. Name it like spaceshipt_enable_vimode
or something.
Something like that? |
Exactly |
@nooulaif please, add fixes I mentioned before. |
What do you mean? I thought I added them already. Can't you see them? |
Woops, my beg. Didn't noticed. |
Thank you a lot! |
Glad I could help. |
Do you have a twitter account? I would like to mention you there and say thank you there, if you agree. |
There is no need for that, but thank you. |
@nooulaif hi! I often use # Temporarily switch to vi-mode
spaceship_enable_vi_mode() {
function zle-keymap-select() { zle reset-prompt; zle -R; };
zle -N zle-keymap-select;
bindkey -v;
} Is there a way to create the same function, but for disabling vi-mode? Something like |
I think typing |
@nooulaif thanks for reply. I've already solved this problem. Now we have two special function:
|
Hello, I think I found solutions to problems presented in comments in #16 issue.
bindkey | grep "vi-quoted-insert"
which will return nothing if in emacs mode.[I]
use:function zle-keymap-select() { zle reset-prompt; zle -R; }; zle -N zle-keymap-select; bindkey -v
which will tell zsh to updateKEYMAP
variable when mode changes (oh-my-zsh vi-mode plugin sets this).I also cleared instructions for disabling built-in vi-mode oh-my-zsh plugin
<<<
right prompt.This is just tweaked version of #16, but I don't know how I can present these changes there, I can only comment.