- I need to remove some linebreaks and can't quite get it done with the
substitute command. Here is what I have:
And I want just want it delete the line break:
Any help would be appreciated. TIA!
Sr Web Developer
> I need to remove some linebreaks and can't quite get it donewell, there are multiple ways to do it.
> with the substitute command. Here is what I have:
> And I want just want it delete the line break:
> name="receiptDate "/>
While you can do it with a substitute command
will trim any whitespace (including newlines). See
for more on that.
Alternatively, you can use the Join command. In Normal mode, you
can simply use "J" to join the current line with the next one. If
you want to preserve the whitespace, you can use "gJ".
You can also do the same sort of thing from an Ex command.
This is handy for use within a global command, such as your
will join every line containing "name=" with the following line.
All sorts of options :)