I am a newb to both Linux and vi, and I've figured most of everything out without having to resort to a forum, but I'm completely stumped.

When I'm editing in vim, and I try to do a global substitute, for example:

:%s/before/after/c

It highlights the first occurence, and asks for my confirmation. If I type in 'n', it stops - even if there are other occurences of 'before' in my file! Sometimes it only does the first one and sometimes it seems to jump between a few random ones but still doesn't do all of them.

What am I missing here?