Mercurial > vim
comparison runtime/doc/if_ruby.txt @ 3750:536aa8b0c934
Update runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 15 Aug 2012 17:43:31 +0200 |
parents | 0aa21d63aba0 |
children | 6ec6b7ff2d43 |
comparison
equal
deleted
inserted
replaced
3749:270bb87555db | 3750:536aa8b0c934 |
---|---|
1 *if_ruby.txt* For Vim version 7.3. Last change: 2010 Oct 27 | 1 *if_ruby.txt* For Vim version 7.3. Last change: 2012 Aug 02 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Shugo Maeda | 4 VIM REFERENCE MANUAL by Shugo Maeda |
5 | 5 |
6 The Ruby Interface to Vim *ruby* *Ruby* | 6 The Ruby Interface to Vim *ruby* *Ruby* |
23 | 23 |
24 ============================================================================== | 24 ============================================================================== |
25 1. Commands *ruby-commands* | 25 1. Commands *ruby-commands* |
26 | 26 |
27 *:ruby* *:rub* | 27 *:ruby* *:rub* |
28 :rub[y] {cmd} Execute Ruby command {cmd}. | 28 :rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: > |
29 :ruby print "Hello" | |
29 | 30 |
30 :rub[y] << {endpattern} | 31 :rub[y] << {endpattern} |
31 {script} | 32 {script} |
32 {endpattern} | 33 {endpattern} |
33 Execute Ruby script {script}. | 34 Execute Ruby script {script}. |
37 form of the |:ruby| command is mainly useful for | 38 form of the |:ruby| command is mainly useful for |
38 including ruby code in vim scripts. | 39 including ruby code in vim scripts. |
39 Note: This command doesn't work when the Ruby feature | 40 Note: This command doesn't work when the Ruby feature |
40 wasn't compiled in. To avoid errors, see | 41 wasn't compiled in. To avoid errors, see |
41 |script-here|. | 42 |script-here|. |
42 | |
43 Command to try it out: > | |
44 :ruby print "Hello" # this is a comment | |
45 | 43 |
46 Example Vim script: > | 44 Example Vim script: > |
47 | 45 |
48 function! RedGem() | 46 function! RedGem() |
49 ruby << EOF | 47 ruby << EOF |
209 Currently the name is "msvcrt-ruby191.dll". That is for Ruby 1.9.1. To know | 207 Currently the name is "msvcrt-ruby191.dll". That is for Ruby 1.9.1. To know |
210 for sure edit "gvim.exe" and search for "ruby\d*.dll\c". | 208 for sure edit "gvim.exe" and search for "ruby\d*.dll\c". |
211 | 209 |
212 If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file | 210 If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file |
213 and comment-out the check for _MSC_VER. | 211 and comment-out the check for _MSC_VER. |
212 You may also need to rename the include directory name to match the version, | |
213 strangely for Ruby 1.9.3 the directory is called 1.9.1. | |
214 | 214 |
215 ============================================================================== | 215 ============================================================================== |
216 vim:tw=78:ts=8:ft=help:norl: | 216 vim:tw=78:ts=8:ft=help:norl: |