How do I remove newlines from a text file?

后端 未结 19 2404
遇见更好的自我
遇见更好的自我 2020-11-29 17:34

I have the following data, and I need to put it all into one line.

I have this:

22791

;

14336

;

22821

;

34653

;

21491

;

25522

;

33238

;
         


        
19条回答
  •  猫巷女王i
    2020-11-29 18:16

    Was having the same case today, super easy in vim or nvim, you can use gJ to join lines. For your use case, just do

    99gJ
    

    this will join all your 99 lines. You can adjust the number 99 as need according to how many lines to join. If just join 1 line, then only gJ is good enough.

提交回复
热议问题