Closed rafaeln closed 9 years ago
Thanks. Just fixed in master.
It is still not working perfectly. Quotes are only properly highlighted in non-initial paragraphs of list items. If the paragraph begins with the quotes, though, they aren't highlighted, and it also breaks formatting for any further paragraphs. Interestingly, highlighting also doesn't work for italics if a paragraph begins with it, and this will also break highlighting in further paragraphs. See the screenshot below.
It seems that I made an oversight about unordered list items, should be fixed now.
Hum, I've just pulled commit e63f7350b25d3b59e8b67c08ef9e76c61ec14b77 and it doesn't seem to solve the issue for me. Can you confirm this is the commit that is supposed to fix it so that I can proceed to test this in a cleaner environment?
Indeed, that is the commit. Lines 451-452 of syntax/pandoc.vim
should be:
call s:WithConceal("quotes", 'syn match pandocBeginQuote /"\</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display', 'conceal cchar=“')
call s:WithConceal("quotes", 'syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display', 'conceal cchar=”')
Hum... We am indeed using the same commit, with lines 451-452 matching what you gave above.
Even using the following minimal .vimrc, which deactivates all other plugins in my system, I still get the same result (screenshot follows)
scriptencoding utf-8
set encoding=utf-8
filetype plugin on
let g:pathogen_disabled = [ 'flappyvird-vim', 'goyo.vim', 'gundo', 'LaTeX-Box', 'python-mode', 'repmo.vim', 'seoul256.vim', 'smartpairs.vim', 'ultisnips', 'vim-abolish', 'vim-characterize', 'vim-colors-solarized', 'vim-commentary', 'vim-easy-align', 'vim-eunuch', 'vim-fugitive', 'vim-gitgutter', 'vim-markdown', 'vim-obsession', 'vim-repeat', 'vim-scriptease', 'vim-sensible', 'vim-snippets', 'vim-surround', 'vim-tmux-navigator', 'vim-unimpaired', 'vim-vinegar', 'vim-visual-star-search', 'vim-yankstack', 'Zenburn']
execute pathogen#infect()
What is the output of
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
when the cursor is over the "
in "quotes"
(line 14) and _
in _italics_
(line 13). It should be:
["pandocBeginQuote"]
and
["pandocEmphasis", "Operator"]
I'm kinda clueless. What vim version are you using?
The output is, ['pandocCodeblock']
whether the cursor is on the "
in "quotes"
(line 14) or on the _
in _italics_
(line 13).
I'm using
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:59)
Included patches: 1-52
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Here are the output of that command in other positions:
Thanks, I see now what the problem is. I was testing over 3 spaces on the indent, so my tests were skewed. I just pushed a partial fix. It still won't be correct when the line begins with _
though (I'm not sure why).
It does seem to work, though, when the line begins with _
(and I've taken this screenshot with my regular .vimrc
)
Weirdness all around, I guess. Perhaps there are further differences between our text samples. Mine was
"quotes"
"quotes"
* item item "quotes" *italics*
something "quotes"
something *italics*
_italics_
something "quotes"
* second item "quotes" *italics*
something "quotes"
something *italics*
"quotes"
something _italics_
Weirdness all around indeed. I copy-pasted your text sample into a vim buffer and got correct highlighting throughout. My text sample goes below
"quotes"
"quotes"
* first item "quotes" _italics_
something "quotes"
something _italics_
_italics_
something "quotes"
* first item "quotes" _italics_
something "quotes"
something _italics_
"quotes"
something _italics_
It seems to work fine in both cases now for me. I guess I had some invalid syntax rule cached, or something like that. I'll close the issue before it jinxes itself.
You can see that in the screenshot below.