mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00

Co-authored-by: wookayin <wookayin@gmail.com> Co-authored-by: clason <c.clason@uni-graz.at> Co-authored-by: Lewis Russell <me@lewisr.dev>
12 lines
361 B
Lua
12 lines
361 B
Lua
if vim.g.loaded_2html_plugin ~= nil then
|
|
return
|
|
end
|
|
vim.g.loaded_2html_plugin = true
|
|
|
|
vim.api.nvim_create_user_command('TOhtml', function(args)
|
|
local outfile = args.args ~= '' and args.args or vim.fn.tempname() .. '.html'
|
|
local html = require('tohtml').tohtml()
|
|
vim.fn.writefile(html, outfile)
|
|
vim.cmd.split(outfile)
|
|
end, { bar = true, nargs = '?' })
|