I remapped [[
and ]]
to find the previous and next pattern in the file. The mappings are as follows:
nmap [[ ?^.section <CR>
nmap ]] /?section /<CR>
The issue is that when I use any of them, I "loose" the current search pattern, so when doing n
for the next match, I search for the next "section".
Is there a way to restore the search pattern, or for the [[
and ]]
mappings to not affect the current search pattern?