-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idea: I would like to switch between tmux and nvim #378
Comments
Good idea. I'm new to Neovim as well, and I also want to solve this issue. I tried what you did and encountered the same error. I realized that this happens when the required keys for each setting in the slime_default_config are not present. I'm not sure about the initialization process of slime_default_config or when it is initialized. This solution below will fix the error you reported, but it's not a perfect solution. You will still need to specify the target_pane or jobid by using vim.opt.shell = "zsh"
vim.g.slime_target = "tmux"
vim.g.slime_python_ipython = 1
vim.g.slime_default_config = {socket_name="default", target_pane="", jobid=""}
function toggle_slime_target()
if vim.g.slime_target == "neovim" then
vim.g.slime_target = "tmux"
else
vim.g.slime_target = "neovim"
end
end
vim.keymap.set('n', '<Leader>sl', toggle_slime_target) |
Hi there, I think the relevant pieces are
I would say the key to switching target/config:
Let me know how that goes |
For those interested, I create this user command which I put in the init function of lazy.nvim: vim.api.nvim_create_user_command('SlimeTarget', function (opts)
vim.b.slime_config = nil
vim.b.slime_target = opts.args
end, { desc = "Change Slime target", nargs = '*'}) You can use this as |
Hi there!
Thank you for the amazing work done here. I'm wondering if there's something that I could do to switch between tmux and nvim in the same session.
My using case is I'm start working in nvim then I start ipython, sending commands and then I have doubts if a code will work the same in my server so I create a new tmux pane, sshing to the server, start a new ipy and then I would like to send the same code block to this new ipython.
I though that it could be done with this:
however, I can't make it works. The first time I've used neovim but when I switch to tmux it raises the following error:
Can be this done? I'm wasting time with this?
The text was updated successfully, but these errors were encountered: