Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toggleterm终端没法复用 #96

Open
qujihan opened this issue Sep 5, 2022 · 6 comments
Open

toggleterm终端没法复用 #96

qujihan opened this issue Sep 5, 2022 · 6 comments

Comments

@qujihan
Copy link

qujihan commented Sep 5, 2022

最近配置asynctasks的时候,配置let g:asynctasks_term_pos = 'toggleterm',当我使用 AsyncTask file-run的时候可以正常运行,但是当我使用<c+>打开term的时候,会再次运行一次AsyncTask file-run。导致我无法使用toggleterm进入命令行模式(任意按键都导致退出终端)

另外,asynctasks_term_close = 1在toggleterm上也是不可用状态。我不清楚是asynctasks.vim对toggleterm的适配不是很好,还是toggleterm本身有问题。

@qujihan
Copy link
Author

qujihan commented Sep 5, 2022

<img width="1280" alt="运行" src="https://user-images.githubusercontent.com/43026824/188498547-bb11692c-4020
asynctasks配置
-43a6-af2d-529f50fd3e61.png">
toggleterm配置

@qujihan
Copy link
Author

qujihan commented Sep 5, 2022

运行

@skywind3000
Copy link
Owner

這些 runner 是定义在 asyncrun 项目里的,你用的这个 toggle term 也一样:

https://github.com/skywind3000/asyncrun.vim/blob/master/README-cn.md#%E9%A2%9D%E5%A4%96%E7%9A%84-runner

你可以参考它的写法,自己定义一个新 runner 即可,比如 toggleterm2.vim 放在任意 runtimepath 的:

autoload/asyncrun/runner 

下面,比如

~/.vim/autoload/asyncrun/runner/toggleterm2.vim

老的 toggleterm.vim 没有处理 reuse 字段,你弄好后可以提交 PR 给我,增强默认的 toggleterm 的 runner

@qujihan
Copy link
Author

qujihan commented Sep 7, 2022

作者大大你好,我修改了原来的toggleterm的配置,并且提交了pr。请你看一下(๑>؂<๑)

@skywind3000
Copy link
Owner

我没有用过 toggleterm,没法帮你 review,请你保证兼容老的 toggleterm 用法不要让老用户没法用即可,否则起一个 toggleterm2

@qujihan
Copy link
Author

qujihan commented Sep 8, 2022

我没有用过 toggleterm,没法帮你 review,请你保证兼容老的 toggleterm 用法不要让老用户没法用即可,否则起一个 toggleterm2

我写了一个新的,原来的没有改过。😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants