On 2026-01-21 05:57, Cristian wrote:
> --- begin testfile.txt ---
> a
> a
> a
> b
> --- end testfile.txt ---
[snip]
> 3. Inside when the cursor is positioned on the first character I type:
> /a<ENTER>
>
> The first "a" is not found. Unless I type "n" until I get to the end of the
> file and then another "n".
>
> Is it possible to search the first character in the file immediately after
> you open the file?
Typically the way I've resolved this is to start the search from the
last line (as long as 'wrapscan' is set, which it is by default so you'd
only need to mess with it if you've unset it explicitly)
:set wrapscan
:$/a
> Is this a bug or a design decision ?
As Tony notes, I'm pretty sure this was a design decision because it
starts the search after the cursor so you don't just keep finding the
same thing.
-tim
--