>-----Original Message-----
>From: 'Ottavio Caruso' via vim_use <vim_use@googlegroups.com>
>Sent: Wednesday, September 18, 2019 2:07 PM
>To: Gary Johnson <garyjohn@spocom.com>
>Cc: vim_use@googlegroups.com
>Subject: [EXTERNAL] Re: Formatting inconsistencies between vim and other text editors
>
>>On Wed, 18 Sep 2019 at 19:43, Gary Johnson <garyjohn@spocom.com> wrote:
>>
>> On 2019-09-18, 'Ottavio Caruso' via vim_use wrote:
>> > First of all, I know vim is a text editor and not a word processor, but...
>> >
>> > I have a heavily formatted resume in pdf that I want to make as
>> > machine-readable as possible yet decently readable by a human.
>> >
>> > I have converted it into plain text first, then, in vim:
>> >
>> > :set textwidth=80
>> >
>> > I selected the text with "V" and applied "gq". Then I've removed all
>> > formatting and put a bit of spaces and tabs here and there.
>> >
>> > It looks great in vim, but when I view it in Pluma, Gedit or Xed
>> > (Debian Stretch) the formatting is all messed up. Some line breaks are
>> > not recognised; tabs are not implemented consistently.
>> >
>> > Where would I start troubleshooting the issue? Have I followed the
>> > wrong workflow?
>>
>> Formatting differences are affected by:
>>
>> - tabstop settings
>> - mixing tabs and spaces for indenting
>> - wrapping of long lines
>> - end-of-line characters
>> - monospace vs. proportional fonts
>>
>> and probably other factors I haven't thought of.
>>
>> For troubleshooting, I would start with executing
>>
>> :verbose set tabstop?
>>
>> to see the current tabstop setting and where it was last set, and
>>
>> :set list
>> :set listchars+=tab:>-
>> :set listchars+=nbsp:_
>>
>> to see ends of lines, tabs and non-breaking spaces.
>
>Thanks.
>
>'tabstop' is at 8, which is fine.
>
>I've "set expandtab" and then reformatted the offending paragraphs,
>and it seems to have fixed the issue.
>
>What I've also done, instead of converting the pdf to text and then
>editing it in vim, I've simply copied the text and pasted it in vim.
>This seems to have removed all the formatting and has created a
>simpler layout.
>
>
>--
>Ottavio Caruso
You will also have the editors' font to deal with (there is no method to
prevent this). Spaces in some fonts are less than that of a normal character, thus
(even using pure spaces) you will have formatting issues. The only consistent
way to ensure your document looks correctly is to view it in PDF.
Maybe also save it as M$'s doc and provide the PDF, doc, and txt files?
Good luck in your job hunt!
Andy
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5ADFF93892EDB147B66FCBABC8E4F27F1628B295%40ARSPAPPEXCH03.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment