zsh-users
 help / color / mirror / code / Atom feed
* Duplicating TRANSIENT_RPROMPT for left PROPMT?
@ 2013-10-22 21:22 Jesse Hathaway
  2013-10-23 13:47 ` Bart Schaefer
  0 siblings, 1 reply; 13+ messages in thread
From: Jesse Hathaway @ 2013-10-22 21:22 UTC (permalink / raw)
  To: ZSH Users Mailing List, Jesse Hathaway

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

When I enter a command the bottom part of my zsh PROMPT is not cleared

~
→ echo a
a- INSERT --
~
→
-- INSERT --

The unusual part of my prompt is the vi mode at the bottom of my screen.
Does anyone have thoughts on the best way to clear the prompt before the
command is entered?

Here is my zshrc:

bindkey -v
setopt prompt_subst

vim_ins_mode="-- INSERT --"
vim_cmd_mode=""
vim_mode=$vim_ins_mode

terminfo_down_sc=$terminfo[cud1]$terminfo[cud1]$terminfo[cuu1]$terminfo[cuu1]$terminfo[sc]$terminfo[cud1]$terminfo[cud1]
function zle-keymap-select {
  vim_mode="${${KEYMAP/vicmd/${vim_cmd_mode}}/(main|viins)/${vim_ins_mode}}"
  zle reset-prompt
}
zle -N zle-keymap-select

function zle-line-finish {
  vim_mode=$vim_ins_mode
}
zle -N zle-line-finish

PS1='%{$terminfo_down_sc$vim_mode$terminfo[rc]%}%~
→ '

Thanks, Jesse

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-11-01 20:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-22 21:22 Duplicating TRANSIENT_RPROMPT for left PROPMT? Jesse Hathaway
2013-10-23 13:47 ` Bart Schaefer
2013-10-25 15:50   ` Jesse Hathaway
2013-10-25 17:23     ` Bart Schaefer
2013-10-29 18:11       ` Jesse Hathaway
2013-10-30  6:19         ` Bart Schaefer
2013-10-30 18:01           ` Jesse Hathaway
2013-10-30 18:51             ` Bart Schaefer
2013-10-31 14:07               ` Jesse Hathaway
2013-10-31 15:09                 ` Bart Schaefer
2013-10-31 18:01                   ` Jesse Hathaway
2013-11-01  1:33                     ` Bart Schaefer
2013-11-01 20:10                       ` Jesse Hathaway

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).