Tuesday, May 19, 2020

issue subtituting new lines

I use several versions of vim throughout the day, all inside xterms, and
some inside tmux running in an xterm. Some versions of vim I have
noticed break my long standing way of adding newlines in a :s///
substitute command.

To make all %% sequences turn into a new line, what I'd type is:

colon percent s slash percent percent slash ctrl-v ctrl-m slash g enter

And that would look like this in vi, nvi, and vim up until recently:

:%s/%%/^M/g

On the versions that break that, it instead looks like this:

:%s/%%/^[[27;5;109~/g

Which will not (does not) provide the subtitution I want.

I have found the vim I'm using on NetBSD inside xterms without tmux
do this, but that same vim on NetBSD inside xterms with tmux does not
do that.

:version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan 7 2020 09:55:54)
Included patches: 1-2200
[...]

:r! uname -sr
NetBSD 8.1

Inside tmux, $TERM is "screen", outside tmux $TERM is "xterm",
$XTERM_VERSION is "XTerm(330)". Figuring out the exact differences
between the screen and xterm terminal definitions is not something I
want to dive into.

If I use vim.old on that same system, the substitute works inside and
outside of tmux. On vim.old:

:version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 11 2019 15:16:00)
Included patches: 1-1517

Is this a known bug that has been fixed in a patch after 2200? If so,
I'll request the vim here be updated. If not, can this be fixed? (And
then I'll request the update.)

thanks,
Elijah

--
--
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/49RNSv1Yp1zfYt%40panix5.panix.com.

No comments: