@nprofile1q... I noticed in my nvi here on FreeBSD that `gJ` still adds/normalizes a space when joining. If there's no trailing whitespace on the current line and there is no leading whitespace on the next line, it adds a space; If there's trailing whitespace on the currently line, and none on the next, it joins without adding extra spaces, and if there's no trailing whitespace on the current line, and leading whitespace on the next line, it normalizes that leading whitespace down to a single space before joining.
Has this changed in more recent versions?
As a side note, since "j" is also an ex-mode command to join lines, I'd normally do that ":2"-followed by "J" as
:2;+j
I'm not sure it saves any keystrokes there, but for longer ranges, it can be easier. It's also useful in :g commands like
:g/pattern/.;+j
Has this changed in more recent versions?
As a side note, since "j" is also an ex-mode command to join lines, I'd normally do that ":2"-followed by "J" as
:2;+j
I'm not sure it saves any keystrokes there, but for longer ranges, it can be easier. It's also useful in :g commands like
:g/pattern/.;+j