gets all of its access to Nvim via the "VIM" module.
Overview >
print "Hello" # displays a message
VIM::Msg("Hello") # displays a message
VIM::SetOption("ai") # sets a vim option
$nbuf = VIM::Buffers() # returns the number of buffers
@buflist = VIM::Buffers() # returns array of all buffers
$mybuf = (VIM::Buffers('a.c'))[0] # returns buffer object for 'a.c'
@winlist = VIM::Windows() # returns array of all windows
$nwin = VIM::Windows() # returns the number of windows
($success, $v) = VIM::Eval('&path') # $v: option 'path', $success: 1
($success, $v) = VIM::Eval('&xyz') # $v: '' and $success: 0
$v = VIM::Eval('expand("<cfile>")') # expands <cfile>
$curwin->SetHeight(10) # sets the window height
@pos = $curwin->Cursor() # returns (row, col) array
@pos = (10, 10)
$curwin->Cursor(@pos) # sets cursor to @pos
$curwin->Cursor(10,10) # sets cursor to row 10 col 10
$mybuf = $curwin->Buffer() # returns the buffer object for window
$curbuf->Name() # returns buffer name
$curbuf->Number() # returns buffer number
$curbuf->Count() # returns the number of lines
$l = $curbuf->Get(10) # returns line 10
@l = $curbuf->Get(1 .. 5) # returns lines 1 through 5
$curbuf->Delete(10) # deletes line 10
$curbuf->Delete(10, 20) # delete lines 10 through 20
$curbuf->Append(10, "Line") # appends a line
$curbuf->Append(10, "L1", "L2", "L3") # appends 3 lines
@l = ("L1", "L2", "L3")
$curbuf->Append(10, @l) # appends L1, L2 and L3
$curbuf->Set(10, "Line") # replaces line 10
$curbuf->Set(10, "Line1", "Line2") # replaces lines 10 and 11
$curbuf->Set(10, @l) # replaces 3 lines
Module Functions:
*perl-Msg*
VIM::Msg({msg})
Displays the message {msg}.
*perl-SetOption*
VIM::SetOption({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|.
*perl-Buffers*
VIM::Buffers([{bn}...]) With no arguments, returns a list of all the buffers
in an array context or returns the number of buffers
in a scalar context. For a list of buffer names or
numbers {bn}, returns a list of the buffers matching
{bn}, using the same rules as Vim's internal
|bufname()| function.
WARNING: the list becomes invalid when |:bwipe| is
used.
*perl-Windows*
VIM::Windows([{wn}...]) With no arguments, returns a list of all the windows
in an array context or returns the number of windows
in a scalar context. For a list of window numbers
{wn}, returns a list of the windows with those
numbers.
WARNING: the list becomes invalid when a window is
closed.
*perl-DoCommand*
VIM::DoCommand({cmd}) Executes Ex command {cmd}.
*perl-Eval*
VIM::Eval({expr}) Evaluates {expr} and returns (success, value) in list
context or just value in scalar context.
success=1 indicates that