ashersyed / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

speak selected text reads all text #403

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I like to have my writing read back to me to catch weird typos and other 
problems. Mac has a great feature to speak selected text using a keyboard 
shortcut (set under System Preferences > Speech > Text to Speech).

However, triggering the shortcut in macvim causes the computer to read all the 
text in the macvim window, starting from the top and even speaking the line 
numbers! The selected text appears to be ignored.

I believe that the macvim interface isn't communicating selections properly to 
the OS, although it may be a configuration setting on my part. When I select 
things using vim in the terminal, they are properly read. I didn't find any 
issues that cover this.

I'm using macvim snapshot 63, on 10.7.3.

Original issue reported on code.google.com by bagro...@gmail.com on 10 Feb 2012 at 7:12

GoogleCodeExporter commented 9 years ago
This requires proper accessibility support which MacVim currently does not 
have.  It is not a simple fix, but I will keep it in mind.

Original comment by bjorn.winckler@gmail.com on 10 Mar 2012 at 3:36

GoogleCodeExporter commented 9 years ago
That's too bad. It would be nice to have such support, but it's not worth it if 
too much effort is required. Thanks!

A workaround could be to build a vim function to pipe the current selected text 
to the say command... In fact, I just figured out how to do it: make your 
visual selection, then type ':w !say' [1]. Vim saves the day again! [2]

[1]. Using ":!say" reads the text but then deletes it by replacing it with the 
output of `say`, which is nothing. See: 
http://stackoverflow.com/questions/1237780/vim-execute-shell-command-without-fil
tering .

[2] This solution may be good enough to close the issue. However, better 
accessibility support may still be worthwhile for impaired users...

Original comment by bagro...@gmail.com on 11 Mar 2012 at 12:52