Wednesday, September 18, 2019

Re: Formatting inconsistencies between vim and other text editors

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.

Regards,
Gary

--
--
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/20190918184347.GA21722%40phoenix.

No comments:

Post a Comment