Thank You John! Awesome!
On Mon, Jun 19, 2017 at 8:29 PM, John Passaro <john.a.passaro@gmail.com> wrote:
use the expression register:s/\v\w+\="\zs\d\d+\ze"/\=submatch(0)-10/g --On Mon, Jun 19, 2017 at 9:59 PM, stosss <stosss@gmail.com> wrote:Placing cursor on the number and typing 10CTRL-X reduces it by the desired amount but how do I do it in a search and replace pattern?--On Mon, Jun 19, 2017 at 7:14 PM, stosss <stosss@gmail.com> wrote:I have several hundred lines like the one below:
<line x1="20" y1="45" x2="820" y2="45" stroke-width="1" stroke="#c0c0c0" />I want to change them like this:
<line x1="10" y1="35" x2="810" y2="35" stroke-width="1" stroke="#c0c0c0" />The "ten" place holder needs to decrease by one.
x1="20" y1="45" x2="820" y2="45"Can someone point me to something that would show me a fast way to do this?I am thinking some how I should be able to use CTRL-X in a search and replace but I don't know how to do it. I am guessing '\=' would be used. I really don't know how to put this together.Thanks
--
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 .
For more options, visit https://groups.google.com/d/optout .
--
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 .
For more options, visit https://groups.google.com/d/optout .
--
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.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment