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

How do I move partial command feedback into the statusline instead of the last screen line?

Answer

:set showcmdloc=statusline

Explanation

When you chain operators and motions, showcmd feedback is critical, but the default bottom-line location can fight with command messages and prompts. showcmdloc=statusline moves partial-command feedback into the statusline, so you keep that signal without burning the last screen row. This is especially useful in dense split layouts where every line of vertical space matters.

How it works

  • showcmd displays pending key sequences (for example after d, c, or g prefixes)
  • showcmdloc controls where that feedback appears
  • :set showcmdloc=statusline renders partial command text inside the statusline instead of the command line area
  • The feature integrates well with cmdheight=0 setups because command feedback remains visible even when command line space is minimized

Example

You are preparing a structural edit and type an unfinished operator chain:

d2f,

With showcmdloc=statusline, the pending sequence appears in the statusline while you type, rather than competing with bottom-row messages.

statusline ... [showcmd: d2f,]

This keeps your editing context stable in heavily split windows where bottom-line churn is distracting.

Tips

  • Pair with set showcmd if it is not already enabled
  • If your statusline is plugin-managed, verify the plugin does not hide native showcmd segments
  • Use this with :set ruler so position info and command progress are both visible in one place

Next

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