Skip to content

timeyyy/orchestra.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orchestra.nvim

Add another dimension to your coding experience

Status = ALPHA i.e api may change/improve

News

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.

Installing

I use dein.vim

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

Then run

call dein#install()
UpdateRemotePlugins

Dependencies

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

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

  • Allow binding to specific keys
  • Custom Events, i.e bind to a range of chars being deleted/inserted
  • More themes
  • Figure out why 80% Autcommands are not procing..
  • Ability to squelch/prioritize simultaneous events
  • Introspection functions i.e see what is registerd
  • Unregister Function

About

Add another dimension to your coding experience

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published