akinsho / akinsho/toggleterm.nvim

Question. Reuse terminal to execute new command

オープン
#573 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Lua
スター
5.6k
フォーク
206
PR マージ指標
30日以内にマージされた PR はありません

説明

I am writing plugin, which can build project. Looks good to use toggleterm as environment to run build command. I don't want to allow user to execute any other commands but build, so i create terminal as
```lua
local cmake_build = Terminal:new({ cmd = "cmake --build ...", --[...]-- })
```
But, when building is done, user may want to build project again. I don't want to delete this terminal and open new one, since it requires for me to throw old terminal's size to new one and other boilerplate. Is it possible to kinda reinitialise terminal keeping same window, buffer and other it's parameters, except `cmd`, `env` and other i want to update. Or, maybe, it is possible to attach new terminal to old terminal's buffer, deleting the old one?

I still haven't fully decided how best to solve this problem, so I'd be glad to know about the method I'm missing. Thanks

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。