Vim RecallEnglish

呼叫 'operatorfunc'

g@{motion}

範例

一般模式 0 / 2

呼叫 'operatorfunc'。

已準備的 operatorfunc

函式
Demo(type): let g:last_type = a:type
operatorfunc
Demo
last_type
尚未呼叫
操作前後

操作前

已準備的 operatorfunc

函式
Demo(type): let g:last_type = a:type
operatorfunc
Demo
last_type
尚未呼叫

操作後

已準備的 operatorfunc

函式
Demo(type): let g:last_type = a:type
operatorfunc
Demo
last_type
char
標記 '[ 和 ']
第 1 行,第 1/4 欄(one 及後方的空格)

操作示意。假設已啟用 +eval。operatorfunc 指定了預先準備的無害 Demo(type) 函式,該函式會將其引數記錄在 g:last_type 中。以 w 完成該運算子。緩衝區文字保持不變。

範例緩衝區
one two
three four
游標位於第 1 行,第 1 欄
詳細說明與 Vim 文件

在一般模式依範例輸入 g@ → w。呼叫 'operatorfunc'。