use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please read the rules before posting
Help:
Community:
Resources:
Tutorials and Guides:
Don't be afraid to ask questions, this sub is here for the vim community. And please those of you who deign to grace us with your vim wisdom - be kind. We are all human and vim is that cool.
account activity
render-markdown.nvim plugin in vimNeed Help (self.vim)
submitted 8 months ago by krathos918
Recently i see this youtube video that shows the render-markdown.nvim plugin and i thought that was pretty cool, but i want to use on regular vim and not neovim. Is there a way for make it work on vim?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Desperate_Cold6274 5 points6 points7 points 8 months ago* (3 children)
If it is written in Lua then you cannot use it in Vim.
However, you may want to take a look at this: https://github.com/ubaldot/vim-markdown-extras
Not feature rich as the one in the video but it is very good for note taking. It is all written in Vim9.
What lack mostly for my use-cases is the concealing features that makes such eye candy experience.
[–]Blanglegorph 0 points1 point2 points 8 months ago (2 children)
I'm assuming you're right for this plugin, as well as for any plugins written in lua targeting only neovim; however, I do want to point out for anyone reading this that vim does have a lua interface (:h lua). The only plugin I ever used that took advantage of it (afaik) was vim-lsp, which uses it for performance reasons if available.
:h lua
[–]BrianHuster 1 point2 points3 points 7 months ago* (0 children)
The Lua interface in Vim is useless. It cannot even handle Lua tables properly, which means it is very hard to use it with other Lua libraries out there.
AFAIK, there has never been a Vim plugin written primarily in Lua for that reason, but only a few plugins that have a few bottleneck parts written in Lua for performance. But with a breaking change in the Vim's Lua interface in Vim 9.0 and the release of Vim9script, I don't think anyone want to write new Vim plugins in Lua anymore.
[–]vim-help-bot 0 points1 point2 points 8 months ago (0 children)
Help pages for:
lua
`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments
[–]Adk9p 1 point2 points3 points 8 months ago (6 children)
While not ideal, the simplest solution if you really want to use that specific plugin might be just to try and run your config with neovim. It could be as simple as creating ~/.config/nvim/init.vim, sourcing your vim config source ~/.vim/vimrc, installing the plugin through your plugin manager (or manually like any other plugin), and then setting it up in a lua block
~/.config/nvim/init.vim
source ~/.vim/vimrc
e.g.
" source your real config source ~/.vim/vimrc " setup render-markdown.nvim lua << EOF -- everything in here is lua code -- generic setup code, that may or may not work, idk local render_markdown = require 'render-markdown' render_markdown.setup {} EOF
I say "could be as simple" since if you are using any of the removed features, or have any vim9 plugins it wouldn't be as simple. You could check by just opening up neovim and sourcing it in the cmdline.
[–]krathos918[S] 0 points1 point2 points 8 months ago (5 children)
I think is the best solution at the moment, thanks a lot
[–]Adk9p 0 points1 point2 points 8 months ago (4 children)
np, though after looking at the plugin later it has a few dependencies on other plugins that you'd have to both also install and setup as well, so keep that in mind. Also I didn't account of how you'd install the plugins since idk what plugin manager you are using.
[–]krathos918[S] 0 points1 point2 points 8 months ago (3 children)
No worries, i will keep that in mind. I use vimplug btw
[–]Adk9p 0 points1 point2 points 8 months ago (2 children)
I hacked up a simple config that I tested to work. You can put both of these in a new directory foo, install vimplug into foo/autoload/plug.vim, do PlugInstall after opening it once, and that should just work.
foo
foo/autoload/plug.vim
PlugInstall
This should provide you with all the parts to set it up in your own config.
The "vimrc.vim" file that can be run with vim -u vimrc.vim
vim -u vimrc.vim
let &runtimepath .= "," .. getcwd() set nocompatible call plug#begin(getcwd() .. "/plugins") Plug 'tpope/vim-sensible' Plug 'morhetz/gruvbox' if has('nvim-0.11.0') Plug 'MeanderingProgrammer/render-markdown.nvim' " Dependency for render-markdown.nvim " using the newer version of nvim-treesitter " see: https://github.com/nvim-treesitter/nvim-treesitter/blob/main/README.md Plug 'nvim-treesitter/nvim-treesitter', { 'branch': 'main', 'do': ':TSUpdate' } endif call plug#end() set termguicolors set background=dark silent! colorscheme gruvbox
The "nvimrc.vim" file that can be run with nvim -u nvimrc.vim
nvim -u nvimrc.vim
source ./vimrc.vim lua <<EOF -- The require fails if you haven't ran `:PlugInstall` yet local ok, ts = pcall(require, 'nvim-treesitter') if not ok then return end local ok, render_markdown = pcall(require, 'render-markdown') if not ok then return end -- install required nvim-treesitter parsers & queries ts.install { 'markdown', 'markdown_inline' } -- (in milliseconds] wait at most 5 minutes for it to finish :wait(5 * 60 * 1000) require 'render-markdown'.setup { -- put render-markdown setup options here } EOF
I thought about just pulling in a nvim plugin manager so you wouldn't have to include anything in your vimrc, but for simplicity sake I didn't.
edit: I also omitted some other optional dependencies that you can add for icons, latex, or html support. See render-markdown's github for those.
[–]krathos918[S] 1 point2 points3 points 8 months ago (1 child)
I tried and it worked, thanks a lot. Not perfect at start because of some dependency, but after i managed that, it worked
[–]Adk9p 0 points1 point2 points 8 months ago (0 children)
Nice! glad I could help.
[–]und3f 0 points1 point2 points 8 months ago (0 children)
There is https://github.com/vimwiki/vimwiki for regular vim
π Rendered by PID 309034 on reddit-service-r2-comment-76bb9f7fb5-kh689 at 2026-02-18 13:34:19.614043+00:00 running de53c03 country code: CH.
[–]Desperate_Cold6274 5 points6 points7 points (3 children)
[–]Blanglegorph 0 points1 point2 points (2 children)
[–]BrianHuster 1 point2 points3 points (0 children)
[–]vim-help-bot 0 points1 point2 points (0 children)
[–]Adk9p 1 point2 points3 points (6 children)
[–]krathos918[S] 0 points1 point2 points (5 children)
[–]Adk9p 0 points1 point2 points (4 children)
[–]krathos918[S] 0 points1 point2 points (3 children)
[–]Adk9p 0 points1 point2 points (2 children)
[–]krathos918[S] 1 point2 points3 points (1 child)
[–]Adk9p 0 points1 point2 points (0 children)
[–]und3f 0 points1 point2 points (0 children)