Tuesday, October 8, 2019

Re: sed whole file

On Tue, Oct 8, 2019 at 4:29 AM Paul <vim91549@rainslide.net> wrote:
On Sun, Oct 06, 2019 at 12:25:20PM +0200, Bram Moolenaar wrote:
>Perhaps we could go back to the original view when typing the search
>separator.  So long as the user is typing the search pattern it is
>useful to show the match, but when typing ":%s/foo/", thus starting to
>type the replacement, it is useful to jump back?
>
>I actually cannot guess if the user wants to see the original text or
>the context of what is going to be replaced. If you have something
>specific, you can copy it beforehand.  And the jumping around can be
>annoying.  Thus I rather leave it like it is.

Not sure if this helps to contribute to the discussion, but personally, I like to see what is going to be replaced, and with what it will be replaced, so I can experiment and get the command right real-time, so I use the traces.vim plugin (https://github.com/markonm/traces.vim).

It can also be helpful to edit the command line as if it were a regular Vim buffer, by executing q: in normal mode or using C-f after you've already started entering the command line using :. I developed the habit of using q/ to edit search lines when I explicitly don't want the cursor to jump to the first occurrence of the string.

--
        Eric Christopherson

--
--
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/CADyB93Bx7m8GP4pktiq%3DLjQqp-7jCRtac-RUe1cRbJ-qQR1yfw%40mail.gmail.com.

No comments: