numToStr / FTerm.nvim

:fire: No-nonsense floating terminal plugin for neovim :fire:
MIT License
721 stars 24 forks source link

Use of FTermToggle #94

Open pmatulis opened 9 months ago

pmatulis commented 9 months ago

How is FTermToggle used? I can open a terminal with FTermOpen but I would like to temporarily return to the editor by toggling the terminal off, with the intention to switch back to it soon after. However I cannot issue the toggle command while in terminal mode no matter how hard I try.

xixiaofinland commented 9 months ago

In insert in terminal mode, you need <C-> to go to normal mode. This is vim/nvim policy instead of FTerm. You can make hotkeys to simplify keystrokes.

I studied the Fterm code and created my own version of the terminal, SFTerm. My need is to send commands to the terminal without leaving the current working window.

The most benefit for me, after going through the code base here is, 1) how to write OO code in Lua 2) how to create and interact with a terminal in Lua/Nvim.

pmatulis commented 9 months ago

How do I toggle with the Ctrl key?

The SFTerm project is strangely associated with Salesforce, which is very offputting. There appear to be built-in commands for it.

xixiaofinland commented 9 months ago

I wrote <C-\><C-n>, no idea why GH turns it... in Terminal mode, you need the above to enter the normal mode where you can switch windows, run hotkeys etc.

my SFTerm is tailored for Salesforce. One thing it does is to send commands to terminal without activating the terminal window nor enter the insert mode of it.

pmatulis commented 9 months ago

Okay, I understand. Thank you.