If you specify no search string in the s command, it uses the last search automatically:
%s//replacement... -- Salman On Tue, 9 Feb 2021, 19:56 Kennedy, Marcus A., <marcus.kenn...@rocket.com> wrote: > > So I was searching through some ugly build commands when I realized that > I needed to go from search mode to command mode to delete part of the > output text I was looking at. Going from command mode with a > :%s/<search String>/<replace text> to search mode will allow you to > press up arrow to get your last :%s/ search string, but it doesn't work > the other way. Is there an easy way within vim to get that string back > from search mode to command mode? A quick google search was unrevealing > (though I don't have access to all hits from my present location). > > Just so you know, I had to shift-select-right-click to copy the text > from Konsole. > > Thanks, > Andy > > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vim_use/5ADFF93892EDB147B66FCBABC8E4F27F54C58CDE%40ARSPAPPEXCH03 > . > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfksqh02hCbfZJYC-b0c7ui2ne_B0mGNtOg1WPcFv%3DNyQ%40mail.gmail.com.