How do I uppercase just the current paragraph without visual selection?
Answer
gUip
Explanation
gUip is a compact operator-plus-text-object pattern that uppercases exactly the paragraph your cursor is in. For long-form writing, commit messages, or quick structural edits, this is faster and safer than starting visual mode and manually expanding the selection. You get precise scope with one command and avoid accidental spillover into adjacent paragraphs.
How it works
gUis the uppercase operatoripis the inner paragraph text object- Combined as
gUip, Vim applies uppercase to the paragraph boundaries around the cursor
Because this uses a text object, it adapts to where the cursor is, not where a visual selection starts. That makes it predictable in repeat edits and easy to compose with other operator workflows.
Example
Before:
first line of paragraph
second line stays with paragraph
next paragraph stays lower
Run:
gUip
After:
FIRST LINE OF PARAGRAPH
SECOND LINE STAYS WITH PARAGRAPH
next paragraph stays lower
Tips
- Use
guipfor lowercase andg~ipfor case toggling with the same paragraph scope. - This pattern generalizes well: operator + text object is one of Vim's strongest editing primitives.