Vigemus / iron.nvim

Interactive Repl Over Neovim
BSD 3-Clause "New" or "Revised" License
1.01k stars 81 forks source link

How to detach from the IronFocus window #356

Closed sntgluca closed 2 months ago

sntgluca commented 10 months ago

Dear all,

I'm walking the first steps with Iron, and enjoying it... ...until I got stuck on a simple problem...

After running some interactive commands while in focus mode, I am not aware of any way to detach from it, and continue writing code.

Is there a simple key combination I am not able to find? Thank you!

jotaefe0 commented 9 months ago

Did you tried Ctrl + "-" This should return you to Normal Mode. Also remember you can move through windows splits using Ctrl+W and "hjkl"

sntgluca commented 8 months ago

Dear @jotaefe0 ,

thanks for the suggestion! I am afraid it didn't work.

I am not sure I explained what I am trying to do well... As long as I use the REPL from the neovim editor, i.e. I send code to the REPL, everything is fine.

But if I get into my ipython session to write some test code from within, I can't get out. the vim bindings don't work, as I am inside ipython at that moment. I guess there must be a way to detach without closing the session but I can't find it...

Any other idea is still welcome :)

raffaem commented 8 months ago

@sntgluca does this help? https://vi.stackexchange.com/a/4922/36430

sntgluca commented 8 months ago

Dear all, still no luck, at least for me...

Could you replicate the behaviour at all?

What do you do differently? Do you just use the hot-keys and never type anything interactively?

sntgluca commented 2 months ago

Hi all,

I learnt that I need to exit from the terminal mode.

A couple of discussion on the internet show that the solution is to use <C-> - maybe map it to something of our liking.

My personal choice, after I setup the Tmux navigator, has been

vim.keymap.set("t", "<space>F", "<C-\\><C-n>:TmuxNavigateLeft<CR>", opts)

Hope it helps someone else