aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
AgeCommit message (Collapse)Author
2015-08-16Don't turn on Galaxy Far Far away when not `g:auditory_on`Teddy Wing
My change from 71ec214cdb8814ecb71c837bf947583fda54d37e caused Galaxy Far Far Away sounds to be turned on any time you had `g:auditory_galaxy_far_far_away` turned on, regardless of whether `g:auditory_on` was also turned on. Fix this because we never want sounds to play when `g:auditory_on` is off. We now rely on `auditory#AssignInsertMappings()` to know whether to use Galaxy Far Far Away or default insert mode sounds. Need to toggle `g:auditory_galaxy_far_far_away` in that function because we're calling the toggle function so we need to set it to the opposite of what we want. In the future if we add more insert mode sounds we'll have to change this structure around but it should work for now.
2015-08-16Create a setting for Galaxy Far Far Away soundsTeddy Wing
Adding a configuration variable for these sounds allows them to be turned on by default without having to `:AuditoryToggleGalaxyFarFarAway`, so if you prefer these sounds you can enable them at the outset.
2015-08-16Add function and command to toggle mappingsTeddy Wing
* Create `auditory#ToggleMappings()` that turns sounds on if they're off and off if they're on * Create an `:AuditoryToggle` command that runs the toggle function in a more user-friendly callable way With a toggle command, turning Auditory on or off can be as simple as hitting 1 custom mapping. With our previous `AuditoryOn` and `AuditoryOff`, you would have to use 2 mappings: 1 for on and another for off.
2015-08-16plugin/auditory.vim: Condense `g:auditory_on` checkTeddy Wing
Realised that I don't need to explicitly check for 1, I can check against true or false. Get rid of the explicit check to make this more concise.
2015-08-16plugin/auditory.vim: Check for `g:auditory_on`Teddy Wing
Don't heedlessly turn on sounds when the plugin is loaded. Instead, give users a choice of whether or not sounds should be loaded when starting Vim with a configuration variable that can be set in a user vimrc. By default sounds are now off.
2015-08-16plugin/auditory.vim: Add `:AuditoryOn` commandTeddy Wing
Create a new command to match `:AuditoryOff` that turns on mappings and sounds. We'll need this because I'm going to make the plugin not enable sounds by default. That will be controlled by a global variable. You'll be able to turn the sounds on and off as you wish.
2015-08-16Unmap insert mode sounds from `auditory#Unmap()`Teddy Wing
* Move the insert mode autocommand definition into a new function that turns on insert mode sounds * Create a function to turn off insert mode sounds * Call these from our normal `AssignMappings` and `Unmap` functions so we can turn all our sounds on and off in one fell swoop
2015-07-28plugin/auditory.vim: Add `:AuditoryOff` commandTeddy Wing
New command that turns the plugin off by removing its mappings.
2015-07-19auditory.vim: `AssignNormalModeMappings` -> `AssignMappings`Teddy Wing
Rename the function because we're not only assigning normal mode mappings here, we're also assigning visual mode mappings. And we might be assigning mappings for other modes here too in the future, so this name doesn't make sense. I had originally called it this to distinguish it from the insert mode set defined in plugin/auditory.vim with the `CursorMovedI` autocommand, but I think this should be more clear about what it's doing. Edit: Also modify the comment above this section for similar reasons.
2015-07-18auditory.vim: Assign mappings with AssignNormalModeMappings()Teddy Wing
Assign our normal mode mappings with our new function that uses the mapping dictionary.
2014-11-27plugin/auditory.vim: Don't reload the plugin if loadedv0.0.5Teddy Wing
I see this in the sources of all the plugins I look at. Figure I should be a good Vim plugin citizen and do this too. This should also provide a convenient way to turn off the plugin when starting Vim.
2014-11-22plugin/auditory.vim: Decrease warning level of mplayer errorTeddy Wing
Instead of echoing and error, just echo a message about mplayer not being installed. Errors look pretty annoying on initial load, and I don't think this is worth the red background colour. It could be that a user has two machines, one with mplayer installed and one without. In that case, I don't want people to have to disable the plugin on one machine. That seems like too much to ask. I think this is a nice middle-ground between alerting users that something is needed by the plugin and not barfing if it's not there.
2014-11-22plugin/auditory.vim: Show warning if mplayer not installedTeddy Wing
On plugin load, if mplayer isn't installed then fail ungracefully. Since we depend on mplayer in order to play any sounds, my thinking now is that I want to fail immediately. Still trying to decide if this is be best course of action. Maybe I just want an informative message instead of a complete failure.
2014-11-09Move functions to autoloadTeddy Wing
Clean up functions, move everything into autoload/, move code around a little bit.
2014-11-09plugin/auditory.vim: Add Galaxy Far Far Away toggle commandTeddy Wing
Add a command-mode command to toggle insert mode sounds between normal and Galaxy Far Far Away versions.
2014-11-09plugin/auditory.vim: Mappings that didn't quite workTeddy Wing
Add commented mappings that I've been trying to get working but that for one reason or another haven't been able to figure out how to do so.
2014-11-09plugin/auditory.vim: Play sounds using absolute pathTeddy Wing
Without this, the audio files wouldn't be able to play unless you were cd'ed into the script's root directory. We want them to play no matter where your pwd is.
2014-11-09plugin/auditory.vim: Add (){} movement soundsTeddy Wing
Use the Jump sound for sentence & paragraph movement.
2014-11-09plugin/auditory.vim: Add another jump mapping for %Teddy Wing
2014-11-09plugin/auditory.vim: Add additional jump mappingsTeddy Wing
Add Jump sound mappings for: * gg * G * <C-i> * <C-o>
2014-11-09plugin/auditory.vim: Add #/* search mappingsTeddy Wing
In addition to the regular search commands, add the search by word ones.
2014-11-09plugin/auditory.vim: Add 'x' mappingTeddy Wing
Use the Delete sound.
2014-11-09plugin/auditory.vim: Add zt/z./zz/zb mappingsTeddy Wing
Use the Jump sound for these comands.
2014-11-09plugin/auditory.vim: Add search mappingsTeddy Wing
Map the search sounds to /nN.
2014-11-09plugin/auditory.vim: Add paste soundsTeddy Wing
2014-11-09plugin/auditory.vim: Add Cantina insert modeTeddy Wing
Version of insert mode binding that maps to the Cantina song. Bits of the song are in wav files. They get played in order on keypress in insert mode.
2014-11-09plugin/auditory.vim: Add 0^_$g_ mappingsTeddy Wing
Add mappings for beginning and end of line that play the left and right sounds.
2014-11-09plugin/auditory.vim: Add gj & gk mappingsTeddy Wing
Map to up and down sounds.
2014-11-09plugin/auditory.vim: Add webWEB mappingsTeddy Wing
Add mappings to the 'w', 'e', 'b' keys and their uppercase equivalents. These map to the Left and Right sounds.
2014-11-09plugin/auditory.vim: Add Normal mode hjkl mappingsTeddy Wing
Add mappings for single-character movement using a pass-through that plays the appropriate movement audio file.
2014-11-09plugin/auditory.vim: Ensure PlayScale() doesn't play the last noteTeddy Wing
The random note chosen should not be the same as the last note played in insert mode.
2014-11-08plugin/auditory.vim: Play a random note on keypress in Insert modeTeddy Wing
When in insert mode, play a random note from the Scale on every keypress.
2014-11-08plugin/auditory.vim(auditory#Play()): Takes a filename argumentTeddy Wing
Make the `Play()` function take an argument of the filename/path string.
2014-11-08plugin/auditory.vim: Remove test mappingsTeddy Wing
These mappings were just to test functionality. The functions they called are now being called in more appropriate places.
2014-11-08plugin/auditory.vim: Rename insert mode augroupTeddy Wing
Intended to use a '#' but replaced it without realising at some point.
2014-11-08plugin/auditory.vim: Remove stray :echomTeddy Wing
2014-11-08Get audio playing working with insert autocmdsTeddy Wing
* Move test .vim file into the plugin/ directory. Some of the functions added in this commit should be moved to autoload/ when this is more together * Add functions: * Get & kill pids for mplayer * Play audio * Insert autocmd handlers * Add InsertEnter & InsertLeave autocmds that start playing the test song when entering insert mode and stop playing when you leave insert mode.