Vim Recall繁體中文

Suspend 'hlsearch' highlighting

:nohlsearch

Example

Normal 0 / 2
one two
three four
five six
keep
Cursor on line 1, column 1

Suspend 'hlsearch' highlighting.

Highlight and syntax

ExampleWord terminal color
'2'
Syntax at line 1, column 1

Search state

Last search pattern
one
Search highlighting
visible
Before & after
Before
one two
three four
five six
keep
Cursor on line 1, column 1

Highlight and syntax

ExampleWord terminal color
'2'
Syntax at line 1, column 1

Search state

Last search pattern
one
Search highlighting
visible
After
one two
three four
five six
keep
Cursor on line 1, column 1

Highlight and syntax

ExampleWord terminal color
'2'
Syntax at line 1, column 1

Search state

Last search pattern
one
Search highlighting
suppressed

Start in Normal mode. The state panel reports actual highlight definitions, match patterns and search-highlight state; colors are not inferred from the command name.

Details & Vim help

Example replayed in Vim

Suspend 'hlsearch' highlighting. 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 :noh[lsearch] 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.