annotate runtime/doc/if_ruby.txt @ 5049:72fcf674e545 v7.3.1268

updated for version 7.3.1268 Problem: ACL support doesn't work when when compiled with MingW. Solution: Support ACL on MingW. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Sat, 29 Jun 2013 15:40:04 +0200
parents 536aa8b0c934
children 6ec6b7ff2d43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
1 *if_ruby.txt* For Vim version 7.3. Last change: 2012 Aug 02
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Shugo Maeda
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 The Ruby Interface to Vim *ruby* *Ruby*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 1. Commands |ruby-commands|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 2. The VIM module |ruby-vim|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 3. VIM::Buffer objects |ruby-buffer|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 4. VIM::Window objects |ruby-window|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 5. Global variables |ruby-globals|
557
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
14 6. Dynamic loading |ruby-dynamic|
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 {Vi does not have any of these commands}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 The Ruby interface only works when Vim was compiled with the |+ruby| feature.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 The home page for ruby is http://www.ruby-lang.org/. You can find links for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 downloading Ruby there.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 1. Commands *ruby-commands*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 *:ruby* *:rub*
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
28 :rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: >
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
29 :ruby print "Hello"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 :rub[y] << {endpattern}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 {script}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 {endpattern}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 Execute Ruby script {script}.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 {endpattern} must NOT be preceded by any white space.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 If {endpattern} is omitted, it defaults to a dot '.'
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 7
diff changeset
37 like for the |:append| and |:insert| commands. This
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 form of the |:ruby| command is mainly useful for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 including ruby code in vim scripts.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 Note: This command doesn't work when the Ruby feature
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 wasn't compiled in. To avoid errors, see
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 |script-here|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 Example Vim script: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 function! RedGem()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 ruby << EOF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 class Garnet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 def initialize(s)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 @buffer = VIM::Buffer.current
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 vimputs(s)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 def vimputs(s)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 @buffer.append(@buffer.count,s)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 gem = Garnet.new("pretty")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 EOF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 *:rubydo* *:rubyd* *E265*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 :[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 [range], with $_ being set to the text of each line in
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 7
diff changeset
65 turn, without a trailing <EOL>. Setting $_ will change
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 the text, but note that it is not possible to add or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 delete lines using this command.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 The default for [range] is the whole file: "1,$".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 *:rubyfile* *:rubyf*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 :rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 ":ruby load 'file'", but allows file name completion.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 Executing Ruby commands is not possible in the |sandbox|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 2. The VIM module *ruby-vim*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 Ruby code gets all of its access to vim via the "VIM" module.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 Overview >
809
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
82 print "Hello" # displays a message
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
83 VIM.command(cmd) # execute an Ex command
809
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
84 num = VIM::Window.count # gets the number of windows
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
85 w = VIM::Window[n] # gets window "n"
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
86 cw = VIM::Window.current # gets the current window
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
87 num = VIM::Buffer.count # gets the number of buffers
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
88 b = VIM::Buffer[n] # gets buffer "n"
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
89 cb = VIM::Buffer.current # gets the current buffer
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
90 w.height = lines # sets the window height
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
91 w.cursor = [row, col] # sets the window cursor position
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
92 pos = w.cursor # gets an array [row, col]
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
93 name = b.name # gets the buffer file name
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
94 line = b[n] # gets a line from the buffer
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
95 num = b.count # gets the number of lines
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
96 b[n] = str # sets a line in the buffer
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
97 b.delete(n) # deletes a line
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
98 b.append(n, str) # appends a line after n
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
99 line = VIM::Buffer.current.line # gets the current line
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
100 num = VIM::Buffer.current.line_number # gets the current line number
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
101 VIM::Buffer.current.line = "test" # sets the current line number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 Module Functions:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 *ruby-message*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 VIM::message({msg})
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 Displays the message {msg}.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 *ruby-set_option*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 VIM::set_option({arg})
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 Sets a vim option. {arg} can be any argument that the ":set" command
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 accepts. Note that this means that no spaces are allowed in the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 argument! See |:set|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 *ruby-command*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 VIM::command({cmd})
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 Executes Ex command {cmd}.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 *ruby-evaluate*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 VIM::evaluate({expr})
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 Evaluates {expr} using the vim internal expression evaluator (see
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 7
diff changeset
123 |expression|). Returns the expression result as a string.
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents: 557
diff changeset
124 A |List| is turned into a string by joining the items and inserting
0f9f4761ad9c updated for version 7.0216
vimboss
parents: 557
diff changeset
125 line breaks.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 3. VIM::Buffer objects *ruby-buffer*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 VIM::Buffer objects represent vim buffers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 Class Methods:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 current Returns the current buffer object.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 count Returns the number of buffers.
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 7
diff changeset
136 self[{n}] Returns the buffer object for the number {n}. The first number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 is 0.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 Methods:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 name Returns the name of the buffer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 number Returns the number of the buffer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 count Returns the number of lines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 length Returns the number of lines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 self[{n}] Returns a line from the buffer. {n} is the line number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 self[{n}] = {str}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 Sets a line in the buffer. {n} is the line number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 delete({n}) Deletes a line from the buffer. {n} is the line number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 append({n}, {str})
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 Appends a line after the line {n}.
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
151 line Returns the current line of the buffer if the buffer is
809
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
152 active.
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
153 line = {str} Sets the current line of the buffer if the buffer is active.
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
154 line_number Returns the number of the current line if the buffer is
4f1b94b51e99 updated for version 7.0b02
vimboss
parents: 799
diff changeset
155 active.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 4. VIM::Window objects *ruby-window*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 VIM::Window objects represent vim windows.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 Class Methods:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 current Returns the current window object.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 count Returns the number of windows.
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 7
diff changeset
166 self[{n}] Returns the window object for the number {n}. The first number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 is 0.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 Methods:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 buffer Returns the buffer displayed in the window.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 height Returns the height of the window.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 height = {n} Sets the window height to {n}.
502
52e76e2b5b65 updated for version 7.0140
vimboss
parents: 236
diff changeset
174 width Returns the width of the window.
52e76e2b5b65 updated for version 7.0140
vimboss
parents: 236
diff changeset
175 width = {n} Sets the window width to {n}.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 cursor Returns a [row, col] array for the cursor position.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 cursor = [{row}, {col}]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 Sets the cursor position to {row} and {col}.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 ==============================================================================
557
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
181 5. Global variables *ruby-globals*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 There are two global variables.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 $curwin The current window object.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 $curbuf The current buffer object.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 ==============================================================================
557
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
189 6. Dynamic loading *ruby-dynamic*
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
190
2625
0aa21d63aba0 Updated runtile files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
191 On MS-Windows and Unix the Ruby library can be loaded dynamically. The
0aa21d63aba0 Updated runtile files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
192 |:version| output then includes |+ruby/dyn|.
557
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
193
2625
0aa21d63aba0 Updated runtile files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
194 This means that Vim will search for the Ruby DLL file or shared library only
0aa21d63aba0 Updated runtile files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
195 when needed. When you don't use the Ruby interface you don't need it, thus
0aa21d63aba0 Updated runtile files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
196 you can use Vim even though this library file is not on your system.
557
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
197
2342
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
198 You need to install the right version of Ruby for this to work. You can find
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
199 the package to download from:
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
200 http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
201 Currently that is ruby-1.9.1-p429-i386-mswin32.zip
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
202
557
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
203 To use the Ruby interface the Ruby DLL must be in your search path. In a
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
204 console window type "path" to see what directories are used.
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
205
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
206 The name of the DLL must match the Ruby version Vim was compiled with.
2342
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
207 Currently the name is "msvcrt-ruby191.dll". That is for Ruby 1.9.1. To know
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
208 for sure edit "gvim.exe" and search for "ruby\d*.dll\c".
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
209
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
210 If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file
f6540762173d Fixes and improvements for MS-Windows build.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
211 and comment-out the check for _MSC_VER.
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
212 You may also need to rename the include directory name to match the version,
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
213 strangely for Ruby 1.9.3 the directory is called 1.9.1.
557
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
214
862863033fdd updated for version 7.0158
vimboss
parents: 502
diff changeset
215 ==============================================================================
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 vim:tw=78:ts=8:ft=help:norl: