The use of \@! can be very tricky. According to the Vim help files, it is often easier to use \@<! instead. For example, to find all 'bar' strings unless they are part of 'foobar', use the following (non-magic):