blob: 893419ece66b6f2c8e85f9a5c267d49cfa0bf0c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
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 = '?' })
|