On Di, 04 Feb 2020, 'Ottavio Caruso' via vim_use wrote:
> Hi,
>
> Maybe this is off-topic but I hope you guys can help, as there's no
> specific maling list for classic vi/nvi.
>
> On my system (Linux/amd64 Debian 4.9.189) I have:
>
> - vim (vim 8.1)
> - vi (aliased to vim)
> - nvi (nvi-1.81.6nb5 )
>
> For self-educational purposes, I've been trying to teach myself to use
> both vim and nvi, as I'm studying for a BSD-related certification,
> where old vi is installed by default. So, to a certain extent, I am
> looking for trouble, however...
>
> I have a file (man-pages.txt) where I have a list of man pages that I
> need to expand, for example:
>
> man 8 tcpdump
> man 1 login
> man 8 sysctl
> man 8 adduser
> man 5 adduser.conf
> man 8 rmuser
> man 8 useradd
> man 8 userdel
>
> and so on. When I am finished with reading a man page, I cut the first
> line and I paste to the last line, so:
>
> 1) dd
> 2) [shift] + g
> 3) p
>
> And I've been doing this for a few months. Sometimes I use vim and
> some other times nvi.
>
> At one point, I noticed that the size of this file was growing
> abnormally. Then, I realised that the entries were in duplicate or
> triplicate copies, that is, as if I had copied the whole file and then
> pasted it twice onto itself.
>
> I removed the duplicate lines and started from scratch and, as a proof
> of concept, alternated between vim and nvi, just to see if this would
> happen again, and indeed it did.
>
> I wonder if somebody has a clue why this happens. Is this something I
> should expect? Is there a markup that one editor places that confuses
> the other?
Not sure what could be causing this. Note however, you can use the
`:copy` or `:t` alias. So to copy the first line to the last line, you
can simply do:
:1t$
Best,
Christian
--
Man muß wissen, daß der Krieg etwas Allgemeines ist, daß das Recht
auf dem Streit beruht und daß alles aus dem Streit und aus der
Notwendigkeit entsteht.
-- Heraklit von Ephesus (540-480 v. Chr.)
--
--
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/20200204134327.GC12806%40256bit.org.
No comments:
Post a Comment