I noticed that, if I use

call term_sendkeys(buf, "make\n")

and then I try to execute something else in the terminal windows (i.e. ls), vim append the last string sent from command mode to the actual string just inserted in the terminal window.

Resuming, if I execute (from command mode)

call term_sendkeys(buf, "make\n")

and then, from the terminal window I execute ls , the inner shell automaticallt executes


Is this a bug or what am I missing here ?


Try following this solution. https://stackoverflow.com/questions/49318522/send-buffer-to-a-running-terminal-window-in-vim-8

I suspect your "\n". Not sure.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.