Extended Vi mode f, F, t, and T key mapping for zsh.
Read a character from the keyboard, and move to the next (or prev) occurrence of it in the BUFFER.
smart-f.zsh is a zsh plugin inspired by clever-f.vim.
zplug "kamykn/smart-f.zsh", defer:2
Finding character and move to the next in the BUFFER (for Emacs mode).
# This is overriding default Emacs mode command
Ctrl-X Ctrl-F {char}
In vi mode f
, F
, t
and T
are overridden (for Vi mode).
# For normal mode (vicmd).
# Finding character and move to the next.
f {char}
# Finding character and move to the previous.
F {char}
# Finding character and move to the position just before the next.
t {char}
# Finding character and move to the position just before the previous.
T {char}
You can remap shortcut key.
# Finding character and move to the next.
bindkey '^F' smart_f_next
# Finding character and move to the previous.
bindkey '^B' smart_f_prev