rafaeln / vim-speak Goto Github PK
View Code? Open in Web Editor NEWMappings to make Vim speak.
Mappings to make Vim speak.
Hello,
The project is interesting. I have some suggestions for more functionnalities but for the integration, i'm not sure how to map it. (don't have the time to fork now)
Have a good day.
"TODO: for char by char prononciation, we need a function detecting
" if current char is alpha, and if it is uppercase, say Maj
" if current char is in speak table, tell the value in speak table
function! Speak(txt,...)
let l:speak_lang=len(a:000)? a:000[0] : g:speak_lang
silent! exe '!espeak -v '.l:speak_lang.' '.shellescape(a:txt,1).' &'
endfunction
function! SpeakCmdOutput(txt,...)
redir => message
silent! execute a:txt
redir END
" echo message
call Speak(message, len(a:000)?a:000[0] : g:speak_lang)
endfunction
command! SpeakLine silent! exe '.w !espeak &'
command! SpeakClear silent! exe '!pkill -9 espeak'
command! -nargs=1 SpeakExpand call Speak(expand(<q-args>))
command! -nargs=1 SpeakReg call Speak(getreg(<q-args>))
command! -nargs=* SpeakCmdOutput call SpeakCmdOutput(<q-args>,'fr')
command! SpeakChar call Speak(matchstr(getline('.'), '\%' . col('.') . 'c.'))
command! SpeakCmdLine call Speak(getreg(':'))
command! SpeakSearchWord call Speak(getreg('/'))
command! SpeakMatchesNumber call SpeakCmdOutput('%s/'.getreg('/').'/&/gn','fr')
command! SpeakFile call Speak(getreg('%'))
command! SpeakFileName call Speak(getreg('%:t'))
command! SpeakLineNum call Speak(line('.'),'fr')
command! SpeakColNum call Speak(col('.'),'fr')
command! SpeakWORD call Speak(expand("<cWORD>"))
command! SpeakWord call Speak(expand("<cword>"))
command! SpeakYanked call Speak(getreg('"'))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.