You're viewing a comment by Nikos and its responses.

Nikos Permalink
September 27, 2011, 03:47

Does ANYONE know how i can go to the next occurrence of a character within a command? Let say that I am the beginning of the following command:

if [ -f `which notify-send` ]; then echo "yes"; fi;

How do I get to the second t with one (or two) keystroke?? I do not mean to count the spaces and apply M+6 M+F!! I mean the equivalent of "2ft" of vi mode!

Thank you!

Comment Responses

Icarus Permalink
September 29, 2012, 06:48

Expecting to do it in one keystroke is unrealistic! One could special case it, so a function key did search for the second t, but how often would you use that feature?

On my system, with bash 4.2, I would type

M-2 C-] t

Meta 2         sets the argument to 2
Control ]      is bound to 'character search'
t              is the character to search for.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "0day_35": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.