Force a redraw of the status line(s)
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Force a redraw of the status line(s).
Current window status line
- Custom format
statusline includes %{g:phase}- g:phase
1- Last rendered value
1
Prepared redraw-statusline.vim
let g:phase = 2 redrawstatus
Command entered · ready to apply
Current window status line
- Custom format
statusline includes %{g:phase}- g:phase
1- Last rendered value
1
Prepared redraw-statusline.vim
let g:phase = 2 redrawstatus
The prepared script changes g:phase to 2 and runs :redrawstatus, which re-evaluates and redraws the current window status line without editing notes.
Current window status line
- Custom format
statusline includes %{g:phase}- g:phase
2- Last rendered value
2
Prepared redraw-statusline.vim
let g:phase = 2 redrawstatus
Before & after
Before
Current window status line
- Custom format
statusline includes %{g:phase}- g:phase
1- Last rendered value
1
Prepared redraw-statusline.vim
let g:phase = 2 redrawstatus
After
Current window status line
- Custom format
statusline includes %{g:phase}- g:phase
2- Last rendered value
2
Prepared redraw-statusline.vim
let g:phase = 2 redrawstatus
Subject: :redrawstatus. Documentation-backed illustration; assumes supported visible custom statusline containing %{g:phase}, g:phase=1 already rendered, readable legacy redraw-statusline.vim in the current directory containing the displayed two commands, unmapped input and no interfering callbacks or pending prompts; not replay-verified. The prepared script changes g:phase to 2 and runs :redrawstatus, which re-evaluates and redraws the current window status line without editing notes.
notesCursor on line 1, column 1Details & Vim help
Force a redraw of the status line(s). 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 :redraws[tatus] 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.