Q
The
Command
The Q command in Vim
Command
ex mode
Enter Ex mode — each line is executed as a command-line command. Type
visual to return to Normal mode. Note: gq{motion} (format/wrap text) and @q (replay macro) are more commonly used in practice. Many configs remap Q to @q.Examples
Q(enter Ex mode):visual or :vi (exit Ex mode)gqip(wrap paragraph)gq$(wrap to end)
Reference
Learn every Vim command visually — right in your browser.
Add Vim What? to Chrome — FreeAlso on Firefox.
Related commands