# make search up and down work, so partially type and hit up/down to find relevant stuff
}
bindkey '^[[A' up-line-or-search
function zle-line-finish(){
bindkey '^[[B' down-line-or-search
echoti rmkx
}
bindkey "^[[H" beginning-of-line
zle -N zle-line-init
bindkey "^[[1~" beginning-of-line
zle -N zle-line-finish
bindkey "^[OH" beginning-of-line
fi
bindkey "^[[F" end-of-line
bindkey "^[[4~" end-of-line
bindkey -e# Use emacs key bindings
bindkey "^[OF" end-of-line
bindkey ' ' magic-space # also do history expansion on space
bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark
bindkey -s'\el''ls\n'# [Esc-l] - run command: ls
bindkey "^[[1;5C" forward-word
bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line.
bindkey "^[[1;5D" backward-word
bindkey "${terminfo[kpp]}" up-line-or-history # [PageUp] - Up a line of history
bindkey "${terminfo[knp]}" down-line-or-history # [PageDown] - Down a line of history