I am using
:g/regex to do global search and it always list
--More-- So I need to click Enter or Space to see the full results, it takes too much time.
I found one way to achieve my goal is to
redir the result into a file then
split the file
nnormap mm :redir! > output.txt \|silent! execute 'g/regex' \| redir END \|vsplit output.txt
This cmd really worked but it need to create file and if I do mutiple different
:g/regex it will overide the previous results.
So I continue to improve and modify the cmd as:
:redir @a |silent! execute 'g/regex' | redir END |vsplit enew| put a
output.txt instead of the
reg @a but still need to specify different
reg to store my search results.
I want to achieve an easy and efficently way to put the different serach results into different split windows
Such as do the First
:g/regex1 then put the results into split
window1 then do the Second
:g/regex2 put the results into the split
Is there any way to achieve and how can I modify the cmd?