zshrc.d/60-vi-showmode.zrc
changeset 19 e0948736d271
parent 17 448a96dfa3e6
child 30 e26330cd408f
equal deleted inserted replaced
18:7095298e6f7d 19:e0948736d271
    45 bindkey -M viins "^X^R" redisplay-insert
    45 bindkey -M viins "^X^R" redisplay-insert
    46 bindkey -M vicmd "^X^R" redisplay-normal
    46 bindkey -M vicmd "^X^R" redisplay-normal
    47 
    47 
    48 screenclear () {
    48 screenclear () {
    49    echo -n "\033[2J\033[400H"
    49    echo -n "\033[2J\033[400H"
       
    50    # 2J = Erase All
       
    51    # 400H = Cursor at the bootom
       
    52    # (Use \033[H to move the cursor to the first line...)
    50    builtin zle .redisplay
    53    builtin zle .redisplay
    51    show_mode "$__string_insert"
    54    show_mode "$__string_insert"
    52 }
    55 }
    53 zle -N screenclear
    56 zle -N screenclear
    54 bindkey "" screenclear
    57 #bindkey "^L" screenclear
    55 
    58 
    56 function zle-line-finish {
    59 function zle-line-finish {
    57    export RPS1="$__string_insert"
    60    export RPS1="$__string_insert"
    58 }
    61 }
    59 zle -N zle-line-finish
    62 zle -N zle-line-finish