Issue
I want to set tab for zsh autocomplition plugin. There is related part of config:
# Widgets that accept the entire suggestion
(( ! ${+ZSH_AUTOSUGGEST_ACCEPT_WIDGETS} )) && {
typeset -ga ZSH_AUTOSUGGEST_ACCEPT_WIDGETS
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(
forward-char
end-of-line
tab-char //my line
vi-forward-char
vi-end-of-line
vi-add-eol
)
}
What is the convention for char names used? How does tab named?
Solution
You will have to put
bindkey ' ' autosuggest-accept
into your .zshrc
file. Notice that the space between the apostrophe is one keystroke of the tab-character.
This works similarly with every other character or character combination. If you for example wanted to put a combination of the ctrl
+space
keys to trigger the acception, you'd append
bindkey '^ ' autosuggest-accept
to the file.
Here's a link to the Configuration-file, where this is explained: https://github.com/zsh-users/zsh-autosuggestions#key-bindings
Answered By - t3d08 Answer Checked By - Mildred Charles (WPSolving Admin)