[vim/vim] The comment symbol `#` of python code block in markdown file is recorgnized as title (Issue #12905)

46 views
Skip to first unread message

draftman9

unread,
Aug 23, 2023, 10:30:46 PM8/23/23
to vim/vim, Subscribed

Steps to reproduce

  1. download the test.md file
  2. open it with gvim and press zM to collapse all the title

test.md

Expected behaviour

The comment symbol # of python code block in markdown file is recorgnized as title instead of a normal comment.

Version of Vim

8.2.2824

Environment

Operating system: Microsoft Windows [Version 10.0.17763.4252]

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905@github.com>

Christian Brabandt

unread,
Aug 24, 2023, 2:08:02 AM8/24/23
to vim/vim, Subscribed

as far as I can see, the markdown syntax file does not support folding. So please verify using vim --clean.

8.2.2824

Oh and please before reporting issues, test with latest Vim


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1691057697@github.com>

lacygoill

unread,
Aug 24, 2023, 3:49:29 AM8/24/23
to vim/vim, Subscribed

Not sure, but I suspect the OP uses the folding provided by the markdown filetype plugin; maybe by setting g:markdown_folding:

let g:markdown_folding = 1

If so, the issue is fixed upstream.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1691182759@github.com>

draftman9

unread,
Aug 24, 2023, 6:45:38 AM8/24/23
to vim/vim, Subscribed

verify using vim --clean.

Then the folding function dispeared totally.

test with latest Vim

Maybe later because I am not very familiar to gvim configuration and I am afraid that the gvim does work after immigrating to vim 9.xx.

Not sure, but I suspect the OP uses the folding provided by the markdown filetype plugin; maybe by setting g:markdown_folding:

let g:markdown_folding = 1

If so, the issue is fixed upstream.

I will list the plugins I have installed:

call plug#begin('~/vimfiles/plugged')
Plug 'itchyny/lightline.vim'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'henrik/vim-indexed-search'
Plug 'junegunn/vim-peekaboo'
Plug 'machakann/vim-highlightedyank'
Plug 'jiangmiao/auto-pairs'

Plug 'godlygeek/tabular'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install'  }
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'lervag/vimtex'
Plug 'KeitaNakamura/tex-conceal.vim'

Plug 'preservim/nerdtree'
Plug 'TroyDanielFZ/vim-easymotion'

Plug 'JuliaEditorSupport/julia-vim'

Plug 'sheerun/vim-polyglot'
Plug 'ycm-core/YouCompleteMe'
Plug 'skywind3000/vim-dict'
Plug 'autozimu/LanguageClient-neovim', {'branch': 'next', 'do': 'powershell -executionpolicy bypass -File install.ps1'}

Plug 'jpalardy/vim-slime'
Plug 'hanschen/vim-ipython-cell'
Plug 'skywind3000/asyncrun.vim'

Plug 'tpope/vim-commentary'

call plug#end()

And I also tried to install the vim-markdown from you provided. But the problem still existed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1691444363@github.com>

lacygoill

unread,
Aug 24, 2023, 7:04:19 AM8/24/23
to vim/vim, Subscribed

I will list the plugins I have installed:

Try to get a minimal reproducible example.

And I also tried to install the vim-markdown from you provided. But the problem still existed.

You're using vim-polyglot which might come with its own markdow filetype plugin and its own logic for how to fold the buffer.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1691468759@github.com>

Christian Brabandt

unread,
Aug 24, 2023, 7:44:55 AM8/24/23
to vim/vim, Subscribed

can you show a screenshot?

what about the output of :scriptnames


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1691522632@github.com>

lacygoill

unread,
Sep 2, 2023, 2:07:55 AM9/2/23
to vim/vim, Subscribed

Any update?

FWIW, last time I checked, I could reproduce the issue with the default markdown filetype plugin. But as already said, it has been fixed upstream. The patch still needs to be merged; last time the plugin was in sync was about a year ago. During that time, only 1 commit has been pushed; the one needed for this issue to be fixed.

If the issue is with a third-party markdown plugin, it should be reported on the bug tracker of their maintainer.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1703722100@github.com>

lacygoill

unread,
Sep 2, 2023, 2:20:19 AM9/2/23
to vim/vim, Subscribed

Maybe later because I am not very familiar to gvim configuration and I am afraid that the gvim does work after immigrating to vim 9.xx.

But if a fix is found in Vim, you'll need to upgrade to benefit from it. If you're afraid of the process, there are various channels to get support:


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1703724434@github.com>

draftman9

unread,
Sep 3, 2023, 1:11:59 AM9/3/23
to vim/vim, Subscribed

But if a fix is found in Vim, you'll need to upgrade to benefit from it. If you're afraid of the process, there are various channels to get support:

Great advice! I will try vim 9 later. This issue does not affect my workflow much so I will close it.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12905/1704008548@github.com>

draftman9

unread,
Sep 3, 2023, 1:12:02 AM9/3/23
to vim/vim, Subscribed

Closed #12905 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/12905/issue_event/10265293398@github.com>

Reply all
Reply to author
Forward
0 new messages