Formatting inconsistencies between vim and other text editors

47 visualizzazioni
Passa al primo messaggio da leggere

Ottavio Caruso

da leggere,
18 set 2019, 13:24:1318/09/19
a vim...@googlegroups.com
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?

--
Ottavio Caruso

Gary Johnson

da leggere,
18 set 2019, 14:43:4418/09/19
a vim...@googlegroups.com
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.

Regards,
Gary

Ottavio Caruso

da leggere,
18 set 2019, 15:07:3718/09/19
a Gary Johnson, vim...@googlegroups.com
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

Kennedy, Marcus A.

da leggere,
18 set 2019, 16:44:1318/09/19
a vim...@googlegroups.com
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

Oleksii Vilchanskyi

da leggere,
19 set 2019, 07:48:4119/09/19
a vim...@googlegroups.com
On 18/09/2019 19:23, '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.

You might want something a bit more sophisticated for that.

To achieve the exact same goals I use Org mode.[0] It is a format that
was made to be exported into other formats. You write the document once
(and the markup language is as readable as Markdown), and then export it
as plain text, UTF-8 text, [X]HTML, LaTeX (to PDF, EPUB, etc.),
LibreOffice formats, as presentation slides, etc. You can write the org
file in vim (or in spacemacs, which is emacs with vim keybindings), but
you will need emacs to do the export part.

>
> 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?
>

[0] <https://orgmode.org/>

--
Regards,
Oleksii Vilchanskyi

meine

da leggere,
24 set 2019, 13:21:4624/09/19
a 'Ottavio Caruso' via vim_use
On Wed, Sep 18, 2019 at 06:23:43PM +0100, 'Ottavio Caruso' via vim_use wrote:
> I have a heavily formatted resume in pdf that I want to make as
> machine-readable as possible yet decently readable by a human.

My strategy on this is to get all of your CV in vim, get rid of all the
external makeup code (both you did already) and then,

rearrange all parts you want to keep in vim in the most clean posible way
-- basically restructuring your text in plain text instead.

a very good way to do so is to use a basic markup language like markdown
(the daringball version and not its derivates). that way you can have a
readable and when necessary exportable version of your CV.

for maintenance your CV is kept clean and straigtforward to edit.

on a higher level you could use LaTeX markup and codings instead of
markdown, but then it could be easier to start exporting the original
GUI CV to LaTeX and then edit and do maintenance with vim.

//meine
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi