Buffer autoreload on external file change event

Hello! Thanks for the great software! I like the look of the built-in text editor, but also would like to use an external editor (namely, RubyMine). I see, it’s possible to load file into buffer, but this action then needs to be done after each edit-save, which feels a bit tedious. Maybe there is an option for monitoring file changes (e.g. inotify) or some other way to automate this? (e.g. bash, AppleScript)
It would be cool to autoload file and maybe even autoplay after that!

I don’t know anything about this software but there is an Atom plugin that works well to play with SP.

Thanks! This was enough clue for implementing it via OSC::Client.

Wow. Very nice! Is it easy to implement some kind of intelligent auto-completion using RubyMine? (Some kind of extended version of the auto-completion in the vanilla-IDE)

Since Sonic Pi syntax is Ruby, I guess it would be enough to create stubs (kinda like “C headers” files) for indexing it. That’s how it’s done for the standard library:

This is a machine generated stub using stdlib-doc for <b>module Enumerable</b>
Sources used:  ruby-2.3.7
Created by IntelliJ Ruby Stubs Generator.

# ...docs...
module Enumerable
  # ...docs...
  def to_a(*args)
    #This is a stub, used for indexing

I was able to extract YARD docs from sources!
Careful, it’s ~7000 lines :slight_smile:

Hi @alerticus . I’ve added the file to my project, but it seems autocomplete in RubyMine still not working.

I want to make a video how to use sonic pi with idea IDE, and show how to automatically play current file in sonic pi on save.