Reputation: 2097
I have the line:
public static void main(String args[])
with my cursor at the start. When I hit fc
it correctly finds the first c
at the end of public
. When I press n
, I expect it to jump to the second; instead I get the error E486: Pattern not found: alias rc
rc
was an alias in my ~.bashrc that expaned to vim ~/.bashrc
After experiencing this problem I removed the line (though I can't see why that should be the cause) and restarted bash and vim. But the problem still persists. I checked my vimrc and there is no mention of either alias or rc or any mapping for n
.
In any case, here is the vimrc: http://codepaste.net/yz3b1r
Upvotes: 1
Views: 416
Reputation: 263267
The f
command finds a single character. fc
finds the next c
.
To repeat an f
search, type ;
(or ,
to repeat the search in the opposite direction).
The /
command finds a regular expression.
To repeat a /
search, type n
(or N
to repeat the search in the opposite direction).
Upvotes: 8
Reputation: 158
I guess you have search for "rc" in another vim session.
If you search for test (/test
), and open another file without "test" using vim, you will properly get the following error when you try to search for "test":
eE486: Pattern not found: test
The fastest way I can think about to go to the second c
is 2fc
if you don't want to do searching.
Upvotes: 0