Spaceship-prompt: How I can remove the character "[I]" in prompt

Created on 25 May 2019  Â·  8Comments  Â·  Source: denysdovhan/spaceship-prompt

On my prompt I am seeing this [I] ➜ before the cursor.

How I can remove the [I] so it will just show the arrow?

Thanks

Most helpful comment

@zer09 Had the same issue, found the answer here https://github.com/denysdovhan/spaceship-prompt/issues/586#issuecomment-497948469

Just need to stick this line somewhere in your .zshrc

spaceship_vi_mode_enable

All 8 comments

586

@laggardkernel ohh got it thanks!!!

BTW last question, is there a problem on vi mode detection? It doesn't change to [N] when on normal mode.

We depend on KEYMAP value for vi_mode detection, Which is updated by various frameworks. If you're using OMZ, Please see docs/Options.md#vi-mode-vi_mode

Note: For oh-my-zsh users with vi-mode plugin enabled: Add export RPS1="%{$reset_color%}" before source $ZSH/oh-my-zsh.sh in .zshrc to disable default <<< NORMAL mode indicator in right prompt.

@zer09 to actually answer your question, you can do this (in your bashrc or zshrc or the rc file for whatever shell you use)

SPACESHIP_VI_MODE_INSERT=

By default it's set to [I], so setting it to nothing will make the indicator go away when you're in insert mode.

@anthropomorphic @salmanulfarzy at the moment I set SPACESHIP_VI_MODE_SHOW to false temporarily. When I asked my original question I don't know it was for the insert mode but now I want to retain it, but also I want the [N] to show when in normal mode, but it is not working it is still showing the [I] when at normal mode. Is there way to fix that? I cant find anything to tweak on the options.

BTW I am not using OMZ or any framework/plugin manager. I did just install spaceship-prompt vanilla using npm.

@zer09 Check that SPACESHIP_VI_MODE_NORMAL is set to [N] (you can check this by running echo $SPACESHIP_VI_MODE_NORMAL.

Yes it is set to [N]

@zer09 Had the same issue, found the answer here https://github.com/denysdovhan/spaceship-prompt/issues/586#issuecomment-497948469

Just need to stick this line somewhere in your .zshrc

spaceship_vi_mode_enable
Was this page helpful?
0 / 5 - 0 ratings

Related issues

tbekaert picture tbekaert  Â·  3Comments

salmanulfarzy picture salmanulfarzy  Â·  3Comments

MatthiasJ picture MatthiasJ  Â·  4Comments

Vvkmnn picture Vvkmnn  Â·  3Comments

AlecRust picture AlecRust  Â·  3Comments