Updated runtime files.

This commit is contained in:
Bram Moolenaar
2015-12-05 20:59:21 +01:00
parent 3f12a2421b
commit 2c5e8e80ea
8 changed files with 266 additions and 227 deletions

View File

@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Oct 16
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Dec 03
VIM REFERENCE MANUAL by Shugo Maeda
@ -7,9 +7,9 @@ The Ruby Interface to Vim *ruby* *Ruby*
1. Commands |ruby-commands|
2. The VIM module |ruby-vim|
3. VIM::Buffer objects |ruby-buffer|
4. VIM::Window objects |ruby-window|
2. The Vim module |ruby-vim|
3. Vim::Buffer objects |ruby-buffer|
4. Vim::Window objects |ruby-window|
5. Global variables |ruby-globals|
6. Dynamic loading |ruby-dynamic|
@ -47,7 +47,7 @@ Example Vim script: >
ruby << EOF
class Garnet
def initialize(s)
@buffer = VIM::Buffer.current
@buffer = Vim::Buffer.current
vimputs(s)
end
def vimputs(s)
@ -74,19 +74,19 @@ Example Vim script: >
Executing Ruby commands is not possible in the |sandbox|.
==============================================================================
2. The VIM module *ruby-vim*
2. The Vim module *ruby-vim*
Ruby code gets all of its access to vim via the "VIM" module.
Ruby code gets all of its access to vim via the "Vim" module.
Overview >
Overview: >
print "Hello" # displays a message
VIM.command(cmd) # execute an Ex command
num = VIM::Window.count # gets the number of windows
w = VIM::Window[n] # gets window "n"
cw = VIM::Window.current # gets the current window
num = VIM::Buffer.count # gets the number of buffers
b = VIM::Buffer[n] # gets buffer "n"
cb = VIM::Buffer.current # gets the current buffer
Vim.command(cmd) # execute an Ex command
num = Vim::Window.count # gets the number of windows
w = Vim::Window[n] # gets window "n"
cw = Vim::Window.current # gets the current window
num = Vim::Buffer.count # gets the number of buffers
b = Vim::Buffer[n] # gets buffer "n"
cb = Vim::Buffer.current # gets the current buffer
w.height = lines # sets the window height
w.cursor = [row, col] # sets the window cursor position
pos = w.cursor # gets an array [row, col]
@ -96,29 +96,29 @@ Overview >
b[n] = str # sets a line in the buffer
b.delete(n) # deletes a line
b.append(n, str) # appends a line after n
line = VIM::Buffer.current.line # gets the current line
num = VIM::Buffer.current.line_number # gets the current line number
VIM::Buffer.current.line = "test" # sets the current line number
line = Vim::Buffer.current.line # gets the current line
num = Vim::Buffer.current.line_number # gets the current line number
Vim::Buffer.current.line = "test" # sets the current line number
<
Module Functions:
*ruby-message*
VIM::message({msg})
Vim::message({msg})
Displays the message {msg}.
*ruby-set_option*
VIM::set_option({arg})
Vim::set_option({arg})
Sets a vim option. {arg} can be any argument that the ":set" command
accepts. Note that this means that no spaces are allowed in the
argument! See |:set|.
*ruby-command*
VIM::command({cmd})
Vim::command({cmd})
Executes Ex command {cmd}.
*ruby-evaluate*
VIM::evaluate({expr})
Vim::evaluate({expr})
Evaluates {expr} using the vim internal expression evaluator (see
|expression|). Returns the expression result as:
- a Integer if the Vim expression evaluates to a number
@ -129,9 +129,9 @@ VIM::evaluate({expr})
Dictionaries and lists are recursively expanded.
==============================================================================
3. VIM::Buffer objects *ruby-buffer*
3. Vim::Buffer objects *ruby-buffer*
VIM::Buffer objects represent vim buffers.
Vim::Buffer objects represent vim buffers.
Class Methods:
@ -159,9 +159,9 @@ line_number Returns the number of the current line if the buffer is
active.
==============================================================================
4. VIM::Window objects *ruby-window*
4. Vim::Window objects *ruby-window*
VIM::Window objects represent vim windows.
Vim::Window objects represent vim windows.
Class Methods: