File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,20 @@ require("nvterm.terminal").new "horizontal"
105105require (" nvterm.terminal" ).new " vertical"
106106```
107107
108+ #### Send commands to the terminal
109+
110+ ``` lua
111+ require (" nvterm.terminal" ).send (" your command " , " horizontal|vertical|float" ) -- the 2nd argument i.e direction is optional
112+ ```
113+
114+ - This function will first open a horizontal terminal and then run the ` node test.js ` command
115+ - Whenever you re-run this function, it'll just run that command in that horizontal terminal.
116+ ``` lua
117+ function ()
118+ require (" nvterm.terminal" ).send (" node test.js" , " horizontal" )
119+ end ,
120+ ```
121+
108122### Additional Functionality
109123
110124NvTerm provides an api for you to send commands to the terminal. You can create different ones for different filetypes like so:
You can’t perform that action at this time.
0 commit comments