Closed z0mbix closed 3 years ago
Use <Cmd>
to run commands from any mode. So you can toggle FTerm with these mappings below.
tnoremap <C-t> <Cmd>lua require'FTerm'.toggle()<CR>
nnoremap <C-t> <Cmd>lua require'FTerm'.toggle()<CR>
In addition to that, you can run into the command mode from terminals with this map: <C-\><C-n>:
I had no idea about tnoremap
. Thanks, this works perfectly 😃
I've installed FTerm and am using
lua require('FTerm').toggle()
to toggle the terminal, which opens it, but once the terminal is open, how to I toggle it closed again as I can't enter neovim's command mode inside the terminal?