1

when pasting from a pdf document, words in the original document are being split up, and replaced by a - and a line break. For example:

alternative specifications. In con-
clusion, these findings 

I'd like to do a global search and replace to join up these lines.

There are many options that get me part way, for example, g/-$/join! will deliver

alternative specifications. In con-clusion,

but I would also like to delete the - in the same command.

Seems like it should be really easy, but...

2
  • 2
    :%s/-\n// or something similar – Christian Brabandt Feb 26 '17 at 20:34
  • Well I was right that it was easy! thanks – Leo Simon Feb 26 '17 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.