I have text in vim that I converted from a pdf file.
The problem I got is that every line within the paragraph is ending in a carriage return and in between the paragraphs there is no empty line to differenciate the beginning or ending of each paragraph. So if I put the text in Microsoft Word I can't make the text smaller and wrap the paragraph around it.
It will be easy if there was an empty line in between paragraphs:
%norm vipJ
But because there isn't, I am thinking of deleting the extra carriage only if the last character is a letter and the column is 65 or more. I know how to search and replace for any letter,
but my question is, how I can execute the search and replace in vim ONLY if last character on the line is on column>65?
UPDATE: So far I managed to do:
:%s/\%>65v\n//g
The problem with that is that as the regex is replacing from the top of the paragraph by the time it comes to the last line, the line was already 'wrap' and obviously the column will be more than 65. I figure it out I should execute the search and replace regex it in reverse, from the bottom of the text to the beginning. How can I do that?