Vim Recall繁體中文

Perform nothing for a few seconds, without the cursor visible

:sleep!

Example

Normal 0 / 2

Perform nothing for a few seconds, without the cursor visible.

Script timing

Elapsed in this wait
0 ms
Buffer
unchanged
Before & after

Before

Script timing

Elapsed in this wait
0 ms
Buffer
unchanged

After

Script timing

Elapsed in this wait
100 ms
Cursor during wait
hidden
Current cursor
visible after wait
Buffer
unchanged

Subject: :sleep!. Documentation-backed illustration; assumes no user interruption; this timing panel is a documentation illustration and does not pause the app; not replay-verified. Intentionally leaves text unchanged while waiting 100 milliseconds; ! hides the cursor during the wait, then it is visible again.

Sample buffer
notes
Cursor on line 1, column 1
Details & Vim help

Perform nothing for a few seconds, without the cursor visible. 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. The index spelling :sl[eep]! puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.