Code Monkey home page Code Monkey logo

Comments (7)

skywind3000 avatar skywind3000 commented on September 28, 2024

那你别加 -focus=0 啊

from asyncrun.vim.

spiedeman avatar spiedeman commented on September 28, 2024

那你别加 -focus=0 啊

倒也是,但感觉不如加个判断条件,pos=floaterm时,强制 focus=1
原本应该在另一个仓库asynctask下提问的,不过发现这边没法删除issue也就算了。主要是 task.ini文件里并未提供 focus选项,每次想切换 pos 的时候,还要额外修改 vimrc里的配置,甚是麻烦。

from asyncrun.vim.

spiedeman avatar spiedeman commented on September 28, 2024

而且,pos=floaterm 时,wintype=float是写死了的,vimrctask.ini配置中均未提供自定义选项。因此,在插件里做条件判断if get(a:opts, 'focus', 1)==0 来提供自动关闭结果窗口的功能,根本不起作用。至少在vim下是这样,neovim不太熟悉,不敢说。

from asyncrun.vim.

skywind3000 avatar skywind3000 commented on September 28, 2024

tasks.ini 中可以写 focus 的,看:

https://github.com/skywind3000/asynctasks.vim/wiki/Task-Config#specification

from asyncrun.vim.

spiedeman avatar spiedeman commented on September 28, 2024

看来是我没发现。
但好像发现一个新问题:没有匹配的自动命令:User AsyncRunInit
因为用terminal输出时,貌似不能配置 CursorMoved 事件发生时自动关闭结果窗口,而用floaterm的话,得进插件里改动floaterm.vim,将wintype=float改为wintype=split。所以想自己写几个函数配合 autocmd 来实现,避免改动插件源码。结果搞了半天,似乎 AsyncRunPreAsyncRunStop 被移除了?

截图_2023-11-25_22-19-23

from asyncrun.vim.

skywind3000 avatar skywind3000 commented on September 28, 2024

只有基于 quickfix 的任务才支持这几个 autocmd,其他终端类,不支持,你可以自己添加终端相关 autocmd

from asyncrun.vim.

spiedeman avatar spiedeman commented on September 28, 2024

只有基于 quickfix 的任务才支持这几个 autocmd,其他终端类,不支持,你可以自己添加终端相关 autocmd

原来如此。

from asyncrun.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.