Saturday, April 9, 2022

Re: global command

Hum. Thank you Stan ! 😃 

Le sam. 9 avr. 2022 à 11:25, Stan Brown <the_stan_brown@fastmail.fm> a écrit :
On 2022-04-09 01:27, Ni Va wrote:
> How to not moving cursor when executing global command ?
>
> g/^EOF/call add(g:ends, line('.'))

I don't know of any way within the g command. However, what I do after a
global command is move the cursor back to where it was before the
command: either '' or ``

See <:help ''> and <:help restore-position>.

--
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/-iZXDs5DWCw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/8a08f47d-686d-0476-bc08-2bec25f80a76%40fastmail.fm.

--
--
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 on the web visit https://groups.google.com/d/msgid/vim_use/CAOKxv4ESoTz%3DoYfoSAzoDkyi5N2t5uAJ5u36ToRmqhLveoQS6Q%40mail.gmail.com.

No comments: