-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table of content for R markdown files #505
Comments
I have Voom and I have put in my init.vim (vimrc if you use Vim):
Then, I run the command Is this a viable solution for you? |
I extracted the TOC functionality from plasticboy/vim-markdown into a small plugin called markdown-toc-toc. I placed the plugin in |
Thanks voom is very nice, somehow it doesn't recognise double file types
In fact I don't need to specify R markdown files as 2 file types I like the fact that Voom can open 2 table of content buffer for 2 files in a split view. Thanks a lot for the advice I prefer Voom to the other solution. |
Thanks for the nice plugin.
Markdown files can get long and I like to open a buffer with a table of content to navigate between the various headers of the document. I was very happy to use the vim-markdown plugin to generate table of contents for markdown files. I created an auto command to activate vim-markdown for Rmd files. Now that I start using Nvim-R more intensively, I hit vim-markdown issue 263: activating vim-markdown removes syntax highlighting and auto completion of the R code chunks. It has been an open issue since 2016.
In jcfaria/Vim-R-plugin#186 you wrote:
@jalvesaq
In fact the only command I want to use from the vim-markdown plugin is the table of content
:Toc
functionality. In R markdown files, I would like to disable all functions related to code chunks but keep the:Toc
command.Minimal reproducible example:
minimal_no_markdown_toc.vim
minimal_markdown_toc.vim
minimal.Rmd
Starting vim with
vim minimal.Rmd -u minimal_no_markdown_toc.vim
I get syntax highlight and autocomplete on R chunks but no table of content for the markdown titles.Starting vim with
vim minimal.Rmd -u minimal_markdown_toc.vim
I loose syntax highlight and autocomplete on R chunks but I get a table of content.I guess it is related to the way vim-markdown detects "fenced code blocs".
Any hint on how I could describe it properly to the vim-markdown authors?
The text was updated successfully, but these errors were encountered: