Skip to content

Instantly share code, notes, and snippets.

@mihalyr
Last active January 10, 2021 17:43
Show Gist options
  • Save mihalyr/b0ddbbc28a3b6d37c32a9df0a13ce631 to your computer and use it in GitHub Desktop.
Save mihalyr/b0ddbbc28a3b6d37c32a9df0a13ce631 to your computer and use it in GitHub Desktop.
VIM Text Objects

VIM text objects

Words

  • aw - a word with surrounding whitespace
  • iw - inner word (does not include surrounding whitespace)

Sentences: as, is

Paragraphs: ap, ip

Programming language text objects

Quoted strings: a", i", a', i', a` , i`

Parens, brackets and braces: a), i), a], i], a}, i}

Markup tags: at, it

Plugin text objects

CamelCaseMotion: i,w inner camel or snake-case word

VimTextObj: aa, ia function arguments

Indent Object: ai, ii current indentation level

Ruby Block: ar, ir Ruby block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment