Sorry to revive an old thread. For any other vim users, this still works with the latest version of Bela with the stock vim.
To bind the compile and run command to a key, use the commands in this gist
Now you can cd
into a project (e.g. cd Bela/projects/sine-generator
), open the render.cpp
file and hit leader
(usually \
) followed by r
to compile and run the file directly from vim. Use ctrl+c
to kill the sound when you're done and then enter to get back to vim. The fnamemodify
part of the command above uses the name of the current folder as the project name so it should work for anything in the projects
folder.