You are not logged in.

#1 2014-01-20 07:57:50

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

[SOLVED]ZSH Home, End etc. keys doesn't work

Hello,

I have problem with ZSH in my urxvt.

When I was in terminal, for ex. my home key instead of getting on the begining of the line wrote "~". So I apllied fix according to zshwiki here: http://zshwiki.org/home/zle/bindkeys . It worked fine, but now, it stopped working. And furthermore, only when I'm in X. In console it works fine, but when i spawn new terminal window (urxvt), problems occurs again. I noticed, that when I type "bindkey -v", it is working correctly. It looks like that ZLE is not able to read "EDITOR" from my  .zshrc and .zshenv, but I don't know why.

Thanks


.zshrc

# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"

# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key


key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}

# setup key accordingly
[[ -n "${key[Home]}"    ]]  && bindkey  "${key[Home]}"    beginning-of-line
[[ -n "${key[End]}"     ]]  && bindkey  "${key[End]}"     end-of-line
[[ -n "${key[Insert]}"  ]]  && bindkey  "${key[Insert]}"  overwrite-mode
[[ -n "${key[Delete]}"  ]]  && bindkey  "${key[Delete]}"  delete-char
[[ -n "${key[Up]}"      ]]  && bindkey  "${key[Up]}"      up-line-or-history
[[ -n "${key[Down]}"    ]]  && bindkey  "${key[Down]}"    down-line-or-history
[[ -n "${key[Left]}"    ]]  && bindkey  "${key[Left]}"    backward-char
[[ -n "${key[Right]}"   ]]  && bindkey  "${key[Right]}"   forward-char

# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
    function zle-line-init () {
        printf '%s' "${terminfo[smkx]}"
    }
    function zle-line-finish () {
        printf '%s' "${terminfo[rmkx]}"
    }
    zle -N zle-line-init
    zle -N zle-line-finish
fi

plugins=(git last-working-dir autopep8 systemd  zsh-syntax-highlighting)

source $ZSH/oh-my-zsh.sh

# Customize to your needs...
export PATH=/usr/local/bin:/usr/bin:/usr/local/texlive/2012/bin/x86_64-linux
export EDITOR=/usr/bin/vim

if [[ "$TERM" =~ ".*256color.*" && -f ~/.dircolors.256colors ]]; then
    eval $(dircolors ~/.dircolors.256colors)
elif [ -f ~/.dircolors ]; then
    eval $(dircolors ~/.dircolors)
fi

.zshenv

export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'
export EDITOR=/usr/bin/vim

# Coloring less command
export LESS=-R
export LESS_TERMCAP_me=$(printf '\e[0m')
export LESS_TERMCAP_se=$(printf '\e[0m')
export LESS_TERMCAP_ue=$(printf '\e[0m')
export LESS_TERMCAP_mb=$(printf '\e[1;32m')
export LESS_TERMCAP_md=$(printf '\e[1;34m')
export LESS_TERMCAP_us=$(printf '\e[1;32m')
export LESS_TERMCAP_so=$(printf '\e[1;44;1m')

Last edited by Kotrfa (2014-01-21 10:18:13)

Offline

#2 2014-01-20 08:55:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED]ZSH Home, End etc. keys doesn't work

What happens if you remove all that Oh-My-Zsh crap?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-01-20 09:48:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]ZSH Home, End etc. keys doesn't work

Offline

#4 2014-01-21 10:17:09

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: [SOLVED]ZSH Home, End etc. keys doesn't work

jasonwryan wrote:

What happens if you remove all that Oh-My-Zsh crap?

Yeah, that helped. Thanks. I used it back in old days, now it is redundant for me.

karol wrote:

As you can see in my .zshrc in the first post, I've already use this guide without success.rap?

Last edited by Kotrfa (2014-01-21 10:17:46)

Offline

Board footer

Powered by FluxBB