Friday, October 23, 2026

AW: Atomic Substitution.

Your description is not quite clear to me. - It sounds as if you want something like :g/pattern/s/pattern/replacement/g or :g/grep-pattern/s/other-pattern/replacement/g i.e. use of the "global" command 'g' to select all existing matching lines, and only on those do another replacement on the second pattern expression. For example to replace the word "world" by "vim" only in lines where "hello world" is seen (but not, e.g., in lines where "world wide web" is written) :g/hello world/s/world/vim/g If that's not what you want, please clarify. Janis ________________________________________ Von: 'Frank Schwidom' via vim_use <vim_use@googlegroups.com> Gesendet: Freitag, 23. Oktober 2026 15:33 An: vim_use@googlegroups.com Betreff: Atomic Substitution. Hi. I woud like to first make ether a range selection or a grep on ines and after that substitute them but only if the substitution can take place on all itemm. Is that possible? Thanks in Advance. -- -- 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+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_use/attiQu6zokeSUzll%40debian64. -- -- 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+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_use/PAXPR05MB890835EB32D675404728FFDEF3642%40PAXPR05MB8908.eurprd05.prod.outlook.com.

No comments: