Nvim の:helpページ。 生成されたもので、 ソース を tree-sitter-vimdoc パーサーを使用して処理しています。
{cmd} Ruby コマンド{cmd}を実行します。試してみるためのコマンドです。:ruby print "Hello":rub[y] << [trim] [
{endmarker}] {script} {endmarker} Ruby スクリプト{script}を実行します。function! RedGem()
ruby << EOF
class Garnet
def initialize(s)
@buffer = VIM::Buffer.current
vimputs(s)
end
def vimputs(s)
@buffer.append(@buffer.count,s)
end
end
gem = Garnet.new("pretty")
EOF
endfunction:ruby print RUBY_VERSION
{cmd} [range]内の各行に対して Ruby コマンド{cmd}を評価します。$_ に各行のテキスト(末尾の<EOL>を除く)が設定されます。$_ を設定するとテキストが変更されますが、このコマンドでは行の追加や削除はできません。[range] のデフォルトはファイル全体です:「1,$」。{file} {file}内の Ruby スクリプトを実行します。これは:ruby load 'file'と同じですが、ファイル名の補完が可能です。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 w.height = lines # sets the window height w.cursor = [row, col] # sets the window cursor position pos = w.cursor # gets an array [row, col] name = b.name # gets the buffer file name line = b[n] # gets a line from the buffer num = b.count # gets the number of lines 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
{arg}) Vim オプションを設定します。{arg}には、":set"コマンドで受け付ける任意の引数を指定できます。引数にスペースを含めることはできません。:setを参照してください。{expr}) Vim の内部式評価器を使用して{expr}を評価します(expressionを参照)。式の結果を文字列として返します。Listは、項目を結合して改行を挿入することで文字列に変換されます。{n}] 番号{n}のバッファオブジェクトを返します。最初の番号は0です。{n}] バッファから行を返します。{n}は行番号です。self[{n}] = {str} バッファ内の行を設定します。{n}は行番号です。delete({n}) バッファから行を削除します。{n}は行番号です。append({n}, {str}) 行{n}の後に行を追加します。line バッファがアクティブな場合、バッファの現在の行を返します。line = {str} バッファがアクティブな場合、バッファの現在の行を設定します。line_number バッファがアクティブな場合、現在の行の番号を返します。{n}] 番号{n}のウィンドウオブジェクトを返します。最初の番号は0です。{n} ウィンドウの高さを{n}に設定します。width ウィンドウの幅を返します。width = {n} ウィンドウの幅を{n}に設定します。cursor カーソル位置の[行、列]配列を返します。最初の行番号は1、最初の列番号は0です。cursor = [{row}, {col}] カーソル位置を{row}と{col}に設定します。