Interesting article and sparkle my interest to write a small function for this as you cannot really read a buffer with a command.
function M.Exec()
lines = vim.fn.getline(1, '$')
command = ''
for key, val in pairs(lines) do .
command = command .. val
end
output = vim.fn.systemlist(command)
vim.api.nvim_command('rightbelow new')
buf = vim.api.nvim_get_current_buf()
vim.api.nvim_buf_set_lines(buf, 0, -1, false, output)
end
return M
Forgot to mention you need to have the latest neovim to enjoy built in lua.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting article and sparkle my interest to write a small function for this as you cannot really read a buffer with a command.
Forgot to mention you need to have the latest neovim to enjoy built in lua.