Skip to content

feature: enable/disable RenderMarkdown per buffer? #313

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

Closed
Dupond opened this issue Jan 29, 2025 · 2 comments
Closed

feature: enable/disable RenderMarkdown per buffer? #313

Dupond opened this issue Jan 29, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@Dupond
Copy link

Dupond commented Jan 29, 2025

Is your feature request related to a problem? Please describe.

Hello!

I often have several markdown files opened in Neovim, and, sometimes (but quite often, in fact) I use :diffthis to compare 2 or 3 buffers between them. The highlights, however, make the comparison very confusing, so I use :syntax off on the diff buffers, while keeping the highlight in the other displayed buffers.

Describe the solution you'd like

It would be nice if it was possible to do the same thing using render-markdown.

So I'd like to be able to use :RenderMarkdown disable and TSBufDisable highlight on the diff buffers only, while keeping RenderMarkdown active in the other windows.

Describe alternatives you've considered

Reading the README one more time, it seems quite clear that :RenderMarkdown disable affects all buffers. Would it be possible to have a function to enable or disable render-markdown in each buffer separately?

Or is it already possible to limit the scope of :RenderMarkdown enable to the active buffer?

Thank you very much for your help!

Additional information

No response

@Dupond Dupond added the enhancement New feature or request label Jan 29, 2025
MeanderingProgrammer added a commit that referenced this issue Feb 2, 2025
## Details

Request: #313

Adds the following commands:

- `buf_enable`
- `buf_disable`
- `buf_toggle`

These are the same as the commands without the `buf_` prefix, but are
run for the current buffer only, instead of all attached buffers.
@MeanderingProgrammer
Copy link
Owner

Added here: d15a144

Is 3 new commands rather than re-using the existing ones with additional parameters:

  • :RenderMarkdown buf_enable
  • :RenderMarkdown buf_disable
  • :RenderMarkdown buf_toggle

@Dupond
Copy link
Author

Dupond commented Feb 2, 2025

Thank you very much! It's perfect! I work in ideal conditions thanks to your plugin. Long live render-markdown!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants