We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free. Anti-spam check. Do not fill this in!===Other commands=== After using <code>\m</code> to enable the keypad mappings, you can press 1..9 on the keypad to highlight the visual selection (if any), or the current word. For example, pressing <code>4</code> on the keypad will highlight using the <code>hl4</code> group. In addition, you can press a digit 1..9 on the main keyboard before pressing 1..9 on the keypad. For example, if you press <code>2</code> on the main keyboard before <code>4</code> on the keypad, the <code>hl24</code> highlight group will be used. The <code>:Hclear</code> command can clear highlights. After typing <code>:Hclear</code>, you can enter an argument, or you can press Space then Tab for command completion (highlighted patterns). Examples: <pre> " Remove highlight for visual selection (if any), or current word. :Hclear " Remove highlight 24. :Hclear 24 " Remove all highlights for pattern '\c\<th'. :Hclear \c\<th " Remove all highlights. :Hclear * </pre> The following command will create a scratch buffer showing all the defined highlights: <pre> :Hsample </pre> The following commands can be used to save or restore the current highlights: <pre> :Hsave anyname :Hrestore anyname </pre> Replace <code>anyname</code> with any name you would like to use. These commands use uppercase global variables (<code>anyname</code> is converted to uppercase), which Vim will save providing you have the <code>!</code> flag in the <code>'viminfo'</code> option (<code>:set viminfo^=!</code>). After typing <code>:Hsave</code> or <code>:Hrestore</code>, you can press Space then Tab for command completion. Summary: Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA Cancel Editing help (opens in new window) Retrieved from "https://vim.fandom.com/wiki/Highlight_multiple_words"