Code Monkey home page Code Monkey logo

vim-speak's People

Contributors

rafaeln avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

vim-speak's Issues

A better 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('"'))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.