When I search with the /
Normal-mode command:
/\\vSEARCHTERM
Vim starts the search from the cursor position and continues downwa
%
is a shortcut for 1,$
( Vim help => :help :%
equal to 1,$ (the entire file).)
.
is the cursor postion so you can do
:.,$s/\vBEFORE/AFTER/gc
To replace from the beginning of the document till the cursor
:1,.s/\vBEFORE/AFTER/gc
etc
I strongly suggest you read the manual about range :help range
as pretty much all commands work with a range.