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

Assign ctags symbols browser to Alt-Q instead of ctrl-k #387

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions zi-browse-symbol
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,10 @@ if [[ $__tfind_spe_call_count -eq 1 ]]; then
zle -A $pup_widget saved-$pup_widget
zle -N $pdown_widget _tfind_simulate_widget
zle -N $pup_widget _tfind_simulate_widget
zle -A zle-line-pre-redraw saved-pre-redraw
zle -D zle-line-pre-redraw
if (( $+widgets[zle-line-pre-redraw] )); then
zle -A zle-line-pre-redraw saved-pre-redraw
zle -D zle-line-pre-redraw
fi
local selected_editor cd_at_edit tagtext tagline taglinebyte tagfile
local -a comm
comm=()
Expand Down Expand Up @@ -457,8 +459,11 @@ if [[ $__tfind_spe_call_count -eq 1 ]]; then
zle -A saved-$pup_widget $pup_widget
zle -D saved-$pdown_widget saved-$pup_widget

zle -A saved-pre-redraw zle-line-pre-redraw
zle -D saved-pre-redraw
if (( $+widgets[saved-pre-redraw] )); then
zle -A saved-pre-redraw zle-line-pre-redraw
zle -D saved-pre-redraw
fi

# Full reinitialisation at next call
__tfind_spe_call_count=0

Expand Down
3 changes: 2 additions & 1 deletion zinit.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3265,6 +3265,7 @@ zle -N zi-browse-symbol
zle -N zi-browse-symbol-backwards zi-browse-symbol
zle -N zi-browse-symbol-pbackwards zi-browse-symbol
zle -N zi-browse-symbol-pforwards zi-browse-symbol
bindkey "^K" zi-browse-symbol
zstyle -s ':zinit:browse-symbol' key ZINIT_TMP || ZINIT_TMP='\eQ'
[[ -n $ZINIT_TMP ]] && bindkey $ZINIT_TMP zi-browse-symbol

# vim:ft=zsh:sw=4:sts=4:et:foldmarker=[[[,]]]:foldmethod=marker