Bonus 1: The Entire and Arguments Text Objects
In addition to the built-in Vim text objects the VSCodeVim extension enhances the suite of text objects with two additional ones:
- The entire text-object represents the entire content of a buffer
- The arguments text-object represents arguments within a function or method in the context of a programming language
With these two new additions the vocabulary of VSCodeVim extends to the entirety of a buffer and arguments within a function and allows you to use all the existing Vim operators on these new tet objects.
The Entire Text Object
Following the pattern used in common text-objects VSCodeVim adds:
aethat represents the whole content of a buffer (all entire buffer)iethat represents the whole content of the buffer without the surrounding whitespace (inside entire buffer)
So that you can:
daedelete (or cut) the whole bufferyieyank (copy) the whole buffer except surrounding whitespace=aeformat the whole buffer>aeincrease indendation in the whole buffer
The Arguments Text Object
In a similar way, and inspired by the great targets.vim Vim plugin, we can use the argument text-objects to interact with function and method arguments:
aarepresents arguments including separatorsiarepresents arguments excluding separators
Taking advantage of this text object we can now:
daadelete the current argument from a function signatureciachange the current argument for something else
This particular plugin can be configured to work with your language of choice using these settings:
| Configuration key | Description | Example |
|---|---|---|
| vim.argumentObjectOpeningDelimiters | list of opening delimiters | ["(", "["] |
| vim.argumentObjectClosingDelimiters | list of closing delimiters | [")", "]"] |
| vim.argumentObjectSeparators | list of separators | [","] |

Written by Jaime González García , dad, husband, software engineer, ux designer, amateur pixel artist, tinkerer and master of the arcane arts. You can also find him on Twitter jabbering about random stuff.
