Vim Recall繁體中文

Run Lua command

:lua

Example

Normal 0 / 2

Run Lua command.

Lua output

Text
Before & after

Before

Lua output

Text

After

Lua output

Text
hello

Documentation-backed illustration. Vim compiled with +lua and a working Lua runtime (:lua). Lua print writes hello to Vim's message area. Primary help: :lua.

Sample buffer
alpha
beta
gamma
Cursor on line 1, column 1
Details & Vim help

Run Lua command. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative. This command requires a Vim build with +lua support and a compatible Lua library linked into Vim or available for dynamic loading.