Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Backspace producing space on command line #597

@scottgrayson

Description

@scottgrayson

I am using tmux zsh with some plugins and iterm 2. I am having problems in command line but not in vim. My backspace key and zsh vi-mode are broken on command line when i use tmux. Let know if my zshrc (at the bottom) is incorrect or if there are incompatible plugins or keybinds listed.

I searched for issues with backspace key and i tried checking and unchecking iterm's "delete key sends ^H" option but it did not change backspace behavior.

i have not put anything in my tmux.conf yet. When i start tmux i get:

/Users/Scott/.zshrc:bindkey:78: cannot bind to an empty key sequence
/Users/Scott/.zshrc:bindkey:79: cannot bind to an empty key sequence

which relates to these lines:

bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down

commenting out the above two lines removes the tmux startup errors but does not solve backspace or zsh-vi-mode errors

here is the rest of my zshrc:

export ZSH=/Users/Scott/.oh-my-zsh
ZSH_THEME="avit"

plugins=(
git
composer
brew
web-search
vagrant
npm
laravel
colorize
colored-man-pages
theme
vi-mode
history-substring-search
)

# User configuration

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin"
export PATH="$PATH:~/.composer/vendor/bin"
export PATH="$PATH:/Users/Scott/Code/spark-installer"
# export MANPATH="/usr/local/man:$MANPATH"

source $ZSH/oh-my-zsh.sh

# bind UP and DOWN arrow keys
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down

# bind UP and DOWN arrow keys (compatibility fallback
# for Ubuntu 12.04, Fedora 21, and MacOSX 10.9 users)
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

# bind k and j for VI mode
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down

# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
    export EDITOR='vim'
else
    export EDITOR='nvim'
fi

# aliases
alias vim="nvim"
alias vi="nvim"
alias cl="clear"

alias git="hub"

alias v="vagrant"
alias homestead="cd ~/Code/Homestead && vagrant up && vagrant ssh"
alias chrome="open -a 'Google Chrome'"

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions