When I do complex substitutions,  I want to see inspect subst,
undo the substitution, before moving to the next one match
(gnuemacs has something similar called "recursive-edit")

Eg. my file contains thousands of dates as seconds, and I want to reformat
the date (but seeing the context around the date)
:%s,\<\(1[45678]\d\d\d\d\d\d\d\d\)\>,\=system("date +' %F-%H:%M' -d
@".submatch(1)." "),gc

 I need an option to show-susbt-pause-undo the substitution and continue to
next.
p[subst and pause]/u [undo, and goto next] in

The options y/n/a/q/l/^E/^Y
Help:
:h :s
[c] Confirm each substitution.  Vim highlights the matching string (with
|hl-IncSearch|).  You can type: *:s_c*
   'y'    to substitute this match
   'l'    to substitute this match and then quit ("last")
   'n'    to skip this match
   <Esc>   to quit substituting
   'a'    to substitute this and all remaining matches
   'q'    to quit substituting
   CTRL-E  to scroll the screen up
   CTRL-Y  to scroll the screen down

thanks
Mosh

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAF0uU3rv%3D6B%2B-7Anp8tb-7ygfb0cYHp0ZD7w8PPgqk3YYMpWgw%40mail.gmail.com.

Raspunde prin e-mail lui