≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #1775

Feature request #1775: Progress indicator for long-running spec process inside Vim

Kind feature request
Product wincent.git
When 2011-02-04T18:06:07Z
Status open
Reporter Greg Hurrell
Tags no tags

Description

Specific use case here is Running RSpec specs from inside Vim. We basically have a long-running spec suite invoked like this:

cexpr system("bin/rspec -r spec/support/vim_formatter.rb -f RSpec::Core::Formatters::VimFormatter " . dir)

The problem is that we can't display feedback during the spec run because the system() call effectively blocks until the entire output is returned.

Related research

  • My post to the vim_use group:
    • "Showing background progress for long-running command": http://www.mail-archive.com/vim_use@googlegroups.com/msg03945.html
    • follow-up: http://www.mail-archive.com/vim_use@googlegroups.com/msg03979.html
  • "Can vimscript be multithreaded?": http://vim.1045645.n5.nabble.com/Can-vimscript-be-multithreaded-td1193376.html
  • https://github.com/MarcWeber/vim-addon-background-cmd
  • vim-addon-async:
    • http://www.vim.org/scripts/script.php?script_id=3307
    • https://github.com/MarcWeber/vim-addon-async
  • "Background grep searches": http://vim.wikia.com/wiki/Background_grep_searches

Comments

  1. Greg Hurrell 2011-02-04T18:27:30Z

    One possible idea which strikes me is the following:

    let tmpfile = tempname()
    
    " this will echo progress as it arrives
    exe '!' . "bin/rspec --no-color -r spec/support/vim_formatter.rb -f RSpec::Core::Formatters::VimFormatter " . dir . " | tee " . tmpfile
    
    " once command is complete we show the quickfix list
    cexpr readfile(tmpfile)
    cw
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets