Search current line in ZSH (vi mode)
vim, zsh
Solution
I hope I understood you right. You want to in zsh command line, move your cursor faster when you type commands.
e.g.
user@hostname: vim /etx/apache2/sites-enabled/defaul[t]
You want to move to the first `e`
I don't use vi-binding, but `f` and `F` are your friends.
In that example, you could `5Fe` move backwards to the 5th `e` . If you don't want to count, you could `Fe`, then press `;`, till it moves to the right position.
check vim help for detail:
:h f
:h F
Also faster way would be `0fe`, for this example. Moving cursor to beginning, then to `e`
If I misunderstood your question, please leave comment, I would remove the answer.
Problem
How do I search/navigate within the current line in zsh? For example, if the cursor is at the end of the line.. ``` // [] indicates cursor position user@hostname: vim /etx/apache2/sites-enabled/defaul[t] ``` In vi normal mode, I'd like to use backward-search (`?`), type `etx` and have the cursor move like so: ``` // [] indicates cursor position user@hostname: vim /[e]tx/apache2/sites-enabled/default ``` However, `/` and `?` are mapped to history search, not inline search. I know I can just type `9b` and get there, but I find searching and moving to the match is easier than counting the number of words to jump. Not sure if this was clear at all, let me know if I need to clarify things.