+sound

31 views
Skip to first unread message

Richard Mitchell

unread,
Nov 12, 2022, 12:09:28 PM11/12/22
to vim_mac
I see that sound has been added to macvim!!

What can we do with it?  Are there examples?

Lifepillar

unread,
Nov 13, 2022, 11:22:14 AM11/13/22
to vim...@googlegroups.com
On 2022-11-12, Richard Mitchell <rwmit...@gmail.com> wrote:
> I see that sound has been added to macvim!!
>
> What can we do with it? Are there examples?

Videogames: https://github.com/vim/killersheep :-)

You may add typewriter sounds on key presses:

autocmd InsertCharPre * call sound_playfile("/path/to/soundfile")

With sound_playevent() you may easily play system sounds (the sounds in
/System/Library/Sounds):

call sound_playevent("Sosumi")

Personally, I would really like Vim to play a sound on search wrap—but
that does not seem easy to do.

If you use Vim to build, compile, or launch (asynchronous) jobs, you may
use sounds to signal when a job is over.

Another (more or less extravagant) idea: combine with timers to make
a “Pomodoro” (a time span for focusing on something): launch a timer
that plays a sound 20–25 minutes from the current time.

Generally speaking, I think that the main use for sounds is hook on some
autocommand or on some callback from asynchronous jobs or timers.

Hope this helps,
Life.

Yee Cheng Chin

unread,
Nov 15, 2022, 6:21:43 PM11/15/22
to vim...@googlegroups.com
Also, in case you are using MacVim specifically (since that was mentioned), note that +sound support was merged into Vim, but not yet to the latest release of MacVim. So if you use a public MacVim release you won't have it yet. A new release (r175) for MacVim should be made soon-ish in November, hopefully.

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_mac/tkr5ja%24vqp%241%40ciao.gmane.io.

Richard Mitchell

unread,
Nov 16, 2022, 7:25:20 AM11/16/22
to vim_mac
I recently pulled the recent macvim source and recompiled and verified +sound was indicated in the version info, so yes, I do have it and have played around with it a little.

And I had also found killersheep shortly after posting.

Not sure what I really expected to be implemented using sounds, but there are a lot more creative people than me, as evidenced by all of the various plugins available.  Life's summary seems spot on for uses.
Reply all
Reply to author
Forward
0 new messages