how do i make the text editor vi make sure that different words separated with a space…
- Assistant
Hello! How can I assist you today?
- User
how do i make the text editor vi make sure that different words separated with a space on the same line are disposed one after another on new rows
- Assistant
In
viorVim, if you want to replace spaces between words with line breaks (effectively putting each word on a new line), you can use the following steps:-
Open your file in
viorVim:bashvi filename -
Enter Command Mode: If you are in insert mode (where you can type text), press
Escto ensure you are in command mode. -
Use a Substitute Command: Type the following command and then press
Enter:vim:%s/ /<C-V><C-M>/gHere’s how it works:
-