In Vim, what is the simplest way to join all lines in a file into a single line? March 11, 2023 by Tarik Another way: ggVGJ “ggVG” visually selects all lines, and “J” joins them.