Giter Club home page Giter Club logo

vim-tasks's Introduction

Tasks

GitHub license Maintenance

An asynchronous task system like VSCode on Vim This script written by vim9, make sure vim >= 9.1

Sceenshot

Features

Wiki

You can visit wiki for details.

Instruction

VSCode uses a .vscode/tasks.json file to define project specific tasks. Similar, Tasks uses a .tasks.json file in your project folders for local tasks and uses ~/.vim/tasks.json for vim to define global tasks for generic projects.

Installtion

For vim-plug

Plug 'caoshenghui/vim-tasks'
Plug 'voldikss/vim-floaterm'

in your .vimrc or init.vim, then restart vim and run :PlugInstall

Usage

Commands

Start a task called taskname:

:TaskRun[!] taskname

Tasks

Maybe you need to visit the Task configuration so that you can configure your tasks.

Example:

  • run your python file using vim-floaterm

    {
      "tasks": [
        {
          "label": "test-run",
          "type": "floaterm",
          "options": {
            "cwd": "${workspaceFolder}"
          },
          "command": "python3",
          "args": ["${file}"]
        }
      ]
    }  

    Run :TaskRun test-run, it will execute python3 ${file}, ${file} and ${workspaceFolder} are predefinedvars.

Extensions

If you want to use floaterm's options you can put it's options to json's typeOptions.If you don't set floaterm's options in tasks.json, when you start a task, it's settings depend on floaterm's options

Example:

{
  "type": "floaterm",
  "typeOptions": {"autoclose": 0, "name": "vim-task", "position": "center"},
  "command": "python3",
  "args": ["${file}"],
  "options": {
    "cwd": "${workspaceFolder}",
   },
   "presentation": {
     // when `panel='shared'`, it will reuse floaterm's windows next
     "panel": "shared",
     // if you omit `options['silent']`, `reveal` will decide whether silent
     "reveal": "silent",
   }
}

If you want to list tasks in LeaderF, you need configure the following option:

g:TasksUsingLeaderF = 1

Using :LeaderfTask or :Leaderf --nowrap task to start

LeaderfScreenShot

Reference

skywind3000/asynctasks.vim
voldikss/vim-floaterm
Yggdroot/LeaderF

License

MIT

vim-tasks's People

Contributors

caoshenghui avatar

Stargazers

 avatar FBW avatar

Watchers

 avatar

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.