Everything works, and I am so grateful that this plugin has met a need for the community, but I am not actively working on features. I accept pull requests and invite contributions, but also wish to make you aware of vim-sonic-pi, which is a more active fork with cool additional features, and supports newer features offered in recent releases of Sonic Pi.
The sonicpi vim plugin requires the following:
The plugin enables itself when Sonic Pi is running and the Ruby filetype is initiated (
let g:sonicpi_enabled = 0 to disable), and provides the following features:
<leader>r- send current buffer or visual mode line selection to sonicpi
<leader>S- send stop message to sonicpi
Contextual autocompletion of Sonic Pi terms with omnicomplete (
<C-x><C-o>by default). That is, if you have
synth :zawa,in the line, omnicomplete will provide parameter names for
:zawa, et al!
Extension of Ruby syntax to include Sonic Pi terms
If you use pathogen (and you should), simply clone this repo into
~/.vim/bundle/ like so:
git clone https://github.com/dermusikman/sonicpi.vim.git
Whenever Sonic Pi is running, and you haven't disabled the
g:sonicpi_enabled flag in your configs, the plugin will activate. Otherwise, it's a normal Ruby session!
g:sonicpi_keymaps_enabled can be used to disable the default keybindings.
g:sonicpi_command can be used to configure what tool is used to send the
code to Sonic Pi. The default is
g:sonicpi_stop can be used to adjust the arguments sent
g:sonicpi_command. The default values are
g:sonicpi_send = '' and
g:sonicpi_stop = 'stop'.
g:vim_redraw, if true (such as by setting it to
1), will redraw the screen
after the stop command instead of waiting for output. Its default value is
As an example, to use
sonic-pi-tool, the following
.vimrc settings would work:
let g:sonicpi_command = 'sonic-pi-tool' let g:sonicpi_send = 'eval-stdin' let g:sonicpi_stop = 'stop' let g:vim_redraw = 1
Sonic Pi interfacing tools
sonic-pi-cli. The default.
sonic-pi-tool. Written in Rust, and more responsive than sonic-pi-cli.
sonic-pi-pipe. An older version of
sonic-pi-toolwith less functionality written in Go.
Fix autocomplete Make contextual autocomplete (e.g., a list of samples follows
Add movement for Sonic Pi style files, ala ruby.vim's modifications(Now we stay in the Ruby filetype) Extend Ruby syntax to incorporate Sonic Pi directives Update for Sonic Pi 2.4
- Add named notes (e.g.,
:e2) and chords (e.g.,
- Add oddball contexts beyond the sounds. For instance, we've added the "spread" context to include