vimtricks.wiki Concise Vim tricks, one at a time.

How do I suppress noisy search count messages while keeping search behavior unchanged?

Answer

:set shortmess+=S

Explanation

Vim's search count feedback ([3/27]) is useful until it starts flooding the command area during rapid navigation. If you already know your match context and want a quieter interface, shortmess+=S removes those search count messages while leaving search behavior intact. This keeps visual noise down in long editing sessions without sacrificing /, ?, n, or N workflows.

How it works

  • shortmess is a message-filter option that suppresses specific UI messages
  • S specifically controls search count reporting messages
  • :set shortmess+=S appends that flag without overwriting your existing shortmess configuration
  • Searches still execute exactly the same; only the informational counter output is muted

Example

Assume you search for TODO in a large file and iterate matches quickly:

/TODO
n n n n

Without this option, Vim can repeatedly print search counters in the command area. After enabling:

:set shortmess+=S

the navigation remains identical, but message churn is reduced so command-line space stays cleaner.

Tips

  • Use :set shortmess? to inspect your current flags before and after changes
  • If you later want the counter back, remove the flag with :set shortmess-=S
  • This pairs well with statusline search count integrations, where you can keep counts visible in a less intrusive place

Next

How do I make @ characters count as part of filenames for gf and path motions?