I plugged float-term
plugin , that open terminal window in neovim
.
when I compile javascript
with node in float term I did like :FloatermNew node %
then it compiles fine and show me the output in terminal window.
But when I want to make shortcut like this
let g:floaterm_keymap_new node % = '<F5>'
in my init.vim
it's give me error like this
Error detected while processing /home/visrut/.config/nvim/init.vim:
E121: Undefined variable: g:floaterm_keymap_new
E488: Trailing characters
what should I write?
Should we have to write function for that also note that let g:floaterm_keymap_new = '<F5>'
works fine but just open terminal.
I also want to do something like on based on filetype you working, I want to like Vim script that if filetype is .cpp
then it compile with g++
and give ./a.out
output to terminal with same shortcut F5
.
If you don't know second answer then please just give in first answer of that wrong syntax.
you can checkout plugin keymaps from here https://vimawesome.com/plugin/vim-floaterm#keymaps