Why does it work to select text in visual mode and then type "d", but not when I do the same and type ":normal d" ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does it work to select text in visual mode and then type "d", but not when I do the same and type ":normal d" ?

Duane Knesek
I'm writing a script and it isn't working.  I basically replaced the guts of my script with exec "normal d" to see if it did anything.  It did not.  So then I tried just typing it at the : prompt, and that also didn't work.  Shouldn't that work?  Or do I fundamentally misunderstand the normal command?

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Why does it work to select text in visual mode and then type "d", but not when I do the same and type ":normal d" ?

Tony Mechelynck
On Sun, Jul 22, 2018 at 7:53 PM, Duane Knesek <[hidden email]> wrote:
> I'm writing a script and it isn't working.  I basically replaced the guts of my script with exec "normal d" to see if it did anything.  It did not.  So then I tried just typing it at the : prompt, and that also didn't work.  Shouldn't that work?  Or do I fundamentally misunderstand the normal command?

What happens if you do «:normal gvd» instead?

If that works, then it means that :normal goes to Normal mode,
canceling Visual mode if set. («gv» restarts Visual mode with the
latest Visual selection active.)

Best regards,
Tony.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Why does it work to select text in visual mode and then type "d", but not when I do the same and type ":normal d" ?

Duane Knesek
Yes, you are correct.  That makes sense.  Thanks!

On Sun, Jul 22, 2018 at 1:44 PM, Tony Mechelynck
<[hidden email]> wrote:

> On Sun, Jul 22, 2018 at 7:53 PM, Duane Knesek <[hidden email]> wrote:
>> I'm writing a script and it isn't working.  I basically replaced the guts of my script with exec "normal d" to see if it did anything.  It did not.  So then I tried just typing it at the : prompt, and that also didn't work.  Shouldn't that work?  Or do I fundamentally misunderstand the normal command?
>
> What happens if you do «:normal gvd» instead?
>
> If that works, then it means that :normal goes to Normal mode,
> canceling Visual mode if set. («gv» restarts Visual mode with the
> latest Visual selection active.)
>
> Best regards,
> Tony.
>
> --
> --
> 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 [hidden email].
> 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.