Home

Awesome

Orchestra.nvim

Add another dimension to your coding experience

Status = ALPHA i.e api may change/improve

News

<a id="introduction"></a>Introduction

Orchestra.nvim is a plugin for neovim that lets you bind sound effects to different actions. The motivation was mostly for fun but it seems useful for training good vim habits. You can literally hear unproductivity and when/where you could improve.

<a id="installing"></a>Installing

I use dein.vim

call dein#add('timeyyy/orchestra.nvim')

Then run

call dein#install()
UpdateRemotePlugins

<a id="dependencies"></a>Dependencies

<a id="usage"></a>Usage

We have some rudimentary theme (tune) support

call dein#add('timeyyy/clacklack.symphony')

call orchestra#prelude()
call orchestra#set_tune('clackclack')

List of Themes

<a id="configuring"></a>Configuring

Themes are just normal vim plugins with a few requirements.

e.g theme "bumblebee_flight":

autoload/
    bumblebee_flight.vim             - the main file
    buzz.wav                          - audio file
    flap.wav
    flap_1.wav
    flap_2.wav

bublebee_flight.vim:

" Absolute path of script file with symbolic links resolved:
let s:current_file = resolve(expand('<sfile>:p'))
call OrchestraAddPath(s:current_file)

We can now customize the behavior of our script. For the moment we only have Ostinato which is just autocmds.

call Ostinato('CursorMovedI', 'flap.wav')
call Ostinato('CursorMoved', 'buzz.wav')

If you just don't want to install a theme you can call Ostinato from within your vimrc as long as it is after orchestra#prelude()

The Ostinato can handle multiple audio files. Multiple parts suffixed with : _# will automatically be discovered and played back at random.

Note audio files must be saved as 16bit wav, 32bit will NOT work

Plans