I have two lines in a text file like below:
S_F
_ID_T_O.DAT
Vi or Vim?
Anyway, the following command works for Vim in 'nocompatible' mode. That is, I suppose, almost pure vi.
:join!
If you want to do it from normal command use
gJ
With 'gJ' you join lines as is -- without adding or removing whitespaces:
S_F
_ID_T_O.DAT
Result:
S_F_ID_T_O.DAT
With 'J' command you will have:
S_F _ID_T_O.DAT
Note space between type> and _ID.