Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh-autosuggestions (in antigen?) breaks some keybindings #29

Closed
paride opened this issue Jul 21, 2014 · 11 comments
Closed

zsh-autosuggestions (in antigen?) breaks some keybindings #29

paride opened this issue Jul 21, 2014 · 11 comments
Labels

Comments

@paride
Copy link

paride commented Jul 21, 2014

I'm trying to use zsh-autosuggestions with antigen, apparently it works, but it breaks some keybindings:

  1. The Home and End key do nothing, but ^A and ^E still work to move the cursor to the beginning and end of line;
  2. ^C has to be pressed two times to kill the line (^U still works, but I find ^C more convenient);
  3. The right arrow does not accept the autosuggestion, but here I'm not sure if it is supposed to do so.

It does not matter if I add "antigen use oh-my-zsh" in my zshrc, I still get these problems. No errors are printed.

If you need me to perform any test just let me know.
Thanks!

@paride
Copy link
Author

paride commented Jul 22, 2014

I have some more information, but the situation is very confused. I have a setup where the "od" tool reports for the Home and End keys the codes ^[OH and ^[OF, while using another terminal I get the ^[[H and ^[[F codes. The first codes do work, the second do not. Without zsh-autosuggestions the keys always work.

I've not been able to consistently reproduce the ^C issue: sometimes just one ^C is sufficient to delete the line, sometimes two are needed.

Sometimes the Tab completion breaks: I get no completion at all. Even here the behavior is not consistent. The completeinword option does not work with zsh-autosuggestions. My zshrc is rather minimal:

source /usr/share/zsh-antigen/antigen.zsh

antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search

antigen bundle tarruda/zsh-autosuggestions
zle-line-init() {
    zle autosuggest-start
}
zle -N zle-line-init

antigen apply

still I get all these incompatibilities. If I don't load the zsh-syntax-highlighting bundle but I load zsh-autosuggestions I get an error on each keypress:

autosuggest-highlight-suggested-text:2: _zsh_highlight: function definition file not found

and this should not happen... Maybe I just have to accept that zsh-autosuggestions will not work in my setup.

@paride paride changed the title zsh-autosuggestione (in antigen?) breaks some keybindings zsh-autosuggestions (in antigen?) breaks some keybindings Jul 22, 2014
@faceleg
Copy link
Contributor

faceleg commented Dec 9, 2014

Still an issue?

@faceleg faceleg added the bug label Dec 9, 2014
@k4nar
Copy link

k4nar commented Dec 9, 2014

It was last time I checked (~2 month ago), I'll try again soon.

@k4nar
Copy link

k4nar commented Dec 10, 2014

The keybindings works, but tab-completion is still broken. It only works with file (not with git, with options, etc…) and I don't think the colors in the suggestions. It works fine without zsh-autosuggestions.

@faceleg
Copy link
Contributor

faceleg commented May 22, 2015

Fixed now?

@k4nar
Copy link

k4nar commented May 29, 2015

The completion is still broken. For example git commands are not completed, only files are.

@jhass
Copy link

jhass commented May 30, 2015

Happens for me too, Home and End are not working. German keyboard and Terminology as terminal emulator.

@ronjouch
Copy link

I am also affected by @legovini's sub-issue 1:

  • With zsh-autosuggestions installed, the Home and End keys fail to move the cursor to the beginning and end of the line...
  • ... but ^A and ^E still work...
  • .... and deinstalling zsh-autosuggestions restore working Home and End.

I am not affected by the two other problems.

I run gnome-terminal-3.16, zsh-5.0.8, oh-my-zsh, and load zsh-autosuggestions with:

source $HOME/.zsh-autosuggestions/autosuggestions.zsh
unset COMPLETION_WAITING_DOTS # https://github.com/tarruda/zsh-autosuggestions#known-issues
AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=3'
zle-line-init() {
  zle autosuggest-start
}
zle -N zle-line-init

Additional data point: I started using zsh-autosuggestions some months ago (like april 2015), I never faced this bug. I tried checking out each git revision (git checkout HEAD^, test, ^D to get a new zsh, repeat) until november 2014 and all have the bug.

→ It must be caused by a change in another component :-/ . I thought it could be a plugin common to all of us (I also use zsh-syntax-highlighting history-substring-search) but removed those and still have the bug. Something in our initialization/environment?

Any idea?

@ronjouch
Copy link

@legovini as I use oh-my-zsh, this is not an antigen issue. Can you update the issue title?

@ronjouch
Copy link

ronjouch commented Jul 3, 2015

Workaround if you use tmux \o/ ! In your ~/.tmux.conf ,

# move to next/prev word with Ctrl, http://stackoverflow.com/questions/9444900/settings-to-move-to-end-of-line-using-tmux
bind -n C-left send-keys M-b
bind -n C-right send-keys M-f

@ericfreese
Copy link
Member

I don't think this is still an issue w/ v0.1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants