Hello,

Vim should speak the name of the current buffer when I switch between open
files. For that I've wrote a little script for Vim. The following is
located in my ~/.vimrc:
" function to speak the title of the current buffer
:py import vim
:py import os
:py import string
function! GetBufferName()
python << EOF
full_name = vim.current.buffer.name
if full_name is None:
        os.system('espeak -v de -s 500 "Kein Titel" > /dev/null 2>&1')
else:
        full_name_list = string.split(full_name, "/")
        os.system('espeak -v de -s 500 "' +     
full_name_list[len(full_name_list)-1] + '" > /dev/null 2>&1')
EOF
endfunction
nnoremap gt gt:call GetBufferName()<cr>
nnoremap gT gT:call GetBufferName()<cr>

I use the standard Vim commands "gt" and "gT" for switching between open
buffers and only append the defined function.

This works really well but I have one problem: When I press "gt" the command
":call GetBufferName()<cr>" is entered in the command prompt automatically and
cause of that Brltty speaks it. So I hear both: the title of the open file and
the spoken command. If I'am fast enough to mute Brltty directly after pressing
"gt" it's ok but this is not very comfortable.

Does anyone have an idea how to mute Brltty in this special case?
Thank you in advance

Regards
Eric

Attachment: signature.asc
Description: Digital signature

_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://mielke.cc/mailman/listinfo/brltty

Reply via email to