Monday, June 5, 2017

Re: Is there a simple way to |^a| and |^x| ?

On 05.06.17 08:29, Tim Chase wrote:
> While a side-stepping of your literal request, you can do
> incrementing/decrementing in search replacements.
>
> For all numbers in a range:
>
> :'<,'>s/-\=\d\+/\=submatch(0)+22/g
>
> to add 22 to all numbers in that range of lines.
...

Thanks Tim, I'll make a note of that for possible future use, but the
crux remains: inc/dec of the magnitude, irrespective of sign. It looks
like I'd need to cobble together a little bit of Vimscript, and map the
functions to keys, maybe Alt-A and Alt-X.

Erik

--
--
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: