root/lang/vim/ruby/say.vim
@
34409
| Revision 14722, 301 bytes (checked in by ujihisa, 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | |
| 2 | command! Say :call <SID>Say() |
| 3 | |
| 4 | function! s:Say() |
| 5 | ruby say |
| 6 | endfunction |
| 7 | |
| 8 | ruby << EOF |
| 9 | def say |
| 10 | require 'pathname' |
| 11 | filenames = (0...VIM::Buffer.count).map {|i| |
| 12 | Pathname.new(VIM::Buffer[i].name).basename |
| 13 | } |
| 14 | system(%Q!echo say #{filenames.join(", ")} | /bin/sh &!) # magick! by ujihisa |
| 15 | end |
| 16 | EOF |
Note: See TracBrowser
for help on using the browser.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)