Bug 1665074 - Unable to format citations in text files
Summary: Unable to format citations in text files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 28
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Petr Šplíchal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-10 13:21 UTC by Petr Šplíchal
Modified: 2019-02-13 06:14 UTC (History)
3 users (show)

Fixed In Version: vim-8.1.818-1.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-13 06:14:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Šplíchal 2019-01-10 13:21:46 UTC
Description of problem:

Trying to format a paragraph of text with a citation does not
work. It seems that the "comments" option is changed when text
filetype is detected. In older vim version this worked fine.

Version-Release number of selected component (if applicable):
vim-enhanced-8.1.575-1.fc29.x86_64

Steps to Reproduce:
1. vim /tmp/something.txt
2. gqap
3. :set comments?

Actual results:
Citation marks ">" scattered across the formatted paragraph.
comments=fb:-,fb:*

Expected results:
Citation marks nicely aligned at the beginning of line.
comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-

Additional info:
cat /tmp/something.txt
> Lorem ipsum dolor sit amet, consectetur
> adipiscing elit, sed do
> eiusmod tempor incididunt ut labore et dolore magna aliqua.
> Ut enim ad minim veniam,
> quis nostrud exercitation ullamco laboris
> nisi ut aliquip ex ea commodo consequat.
> Duis aute irure dolor in reprehenderit in voluptate velit.

Works fine with vim-enhanced-7.4.160-5.el7.x86_64.
Works fine without file extension (vim something).

Comment 1 Petr Šplíchal 2019-01-10 13:32:18 UTC
Actual results:
> Lorem ipsum dolor sit amet, consectetur > adipiscing elit, sed
do > eiusmod tempor incididunt ut labore et dolore magna aliqua.
> Ut enim ad minim veniam, > quis nostrud exercitation ullamco
laboris > nisi ut aliquip ex ea commodo consequat.  > Duis aute
irure dolor in reprehenderit in voluptate velit.

Expected results:
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
> eiusmod tempor incididunt ut labore et dolore magna aliqua.  Ut
> enim ad minim veniam, quis nostrud exercitation ullamco laboris
> nisi ut aliquip ex ea commodo consequat.  Duis aute irure dolor
> in reprehenderit in voluptate velit.

Comment 2 Zdenek Dohnal 2019-01-10 14:17:09 UTC
Hi Petr,

thank you for reporting the issue and your help! I found out it is caused by setting in /usr/share/vim/vim81/ftplugin/text.vim, where comments variable is set to current values. Because it is the issue in the plugin which is not owned by Vim upstream but shipped by it, I need to contact the plugin's maintainer with the patch - then Vim's upstream will take the patch from plugin's maintainer.
The fix is done by adding 'n:>' into runtime/ftplugin/text.vim:16:

-setlocal comments=fb:-,fb:*
+setlocal comments=fb:-,fb:*,n:>

Setting the state to POST, since I'll send the patch to plugin's upstream by email.

Comment 3 Fedora Update System 2019-01-25 10:26:51 UTC
vim-8.1.818-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8a8196e1e1

Comment 4 Zdenek Dohnal 2019-01-25 10:27:59 UTC
Upstream accepted the patch, the fix is in the newest build in bodhi.

Comment 5 Fedora Update System 2019-01-26 01:43:51 UTC
vim-8.1.818-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8a8196e1e1

Comment 6 Petr Šplíchal 2019-02-12 10:27:14 UTC
Thanks for the quick fix, Zdeněk. Tested with the latest vim
(vim-enhanced-8.1.873-1.fc29.x86_64). Now works as expected.

Comment 7 Fedora Update System 2019-02-13 06:14:27 UTC
vim-8.1.818-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.