Insert/normal mode in Vim (was formerly about Matchit.vim plugin)

Tim Chase blinux.list at thechases.com
Wed Nov 21 01:48:05 UTC 2007


> To my mind the only drawback of vim is that there's no aural
> way to know whether you're in edit mode or in command mode. I
> wish Speakup could change pitch to indicate that. I'm forever
> cleaning something up for making that mistake.

I believe that in Vim7,  InsertEnter and InsertLeave
auto-commands were added so you could do something like

:autocmd InsertEnter * call system('play /path/to/insert.wav')
:autocmd InsertLeave * call system('play /path/to/normal.wav')

which would at least give you an audio icon on entering/exiting
insert mode.

Alternatively, if your screen-reader has a command-line way to
manipulate its global settings, you could make those something like

:autocmd InsertEnter * call system('speakup pitch=75')
:autocmd InsertLeave * call system('speakup pitch=50')

where the "speakup pitch=#" is your command for adjusting your
preferred pitch/volume/voice/speed/etc.  Thus it might be
feasible to even do something like

:autocmd InsertEnter * call system('speakup voice=Mike')
:autocmd InsertLeave * call system('speakup voice=Mary')

It comes with a little annoying latency overhead as the command
is called, but at least it might give you a workaround for your
annoyance.

Hope this helps,

-tim







More information about the Blinux-list mailing list