How to send content to REPL with init.lua?
Hi there,
I have successfully launched a REPL with :Repl matlab
, but cannot figure out how to send content to it. I have in my init.lua
the following configuration, but the key mappings don't seem to have any effect.
Any idea?
vim.g.repl = {
matlab = {
bin = 'matlab',
args = {'-nodisplay'},
syntax = 'matlab',
title = 'MATLAB REPL'
}
}
-- Send the text of a motion to the REPL
vim.api.nvim_set_keymap('n', '<leader>rs', '<Plug>(ReplSend)', { noremap = true, silent = true })
-- Send the current line to the REPL
vim.api.nvim_set_keymap('n', '<leader>rss', '<Plug>(ReplSendLine)', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>rs_', '<Plug>(ReplSendLine)', { noremap = true, silent = true })
-- Send the selected text to the REPL
vim.api.nvim_set_keymap('v', '<leader>rs', '<Plug>(ReplSend)', { noremap = true, silent = true })
Edited by Qingyao Sun