Home

Awesome

vim-textobj-matchit

A Vim plugin that creates text objects from matchit pairs, to be used with:

:package: Installation

Depends on vim-textobj-user and matchit.

Plug 'kana/vim-textobj-user'
Plug 'adriaanzon/vim-textobj-matchit'

runtime macros/matchit.vim

It's likely that matchit is already enabled. You can check so by running :echo g:loaded_matchit. It will return 1 when it's enabled.

:sparkles: Usage

Textobj-matchit maps 2 keystrokes: am and im. They work like any other text object: am selects the all of the matchit pair, im the inner portion of the matchit pair.

See :h textobj-matchit for more details, including instructions on how to define your own key mappings.

:man_teacher: History

This plugin derives from vim-textobj-rubyblock and vim-textobj-blade-directive. I wanted something similar that works for every filetype, so that is why I created this plugin.

:page_facing_up: License

Copyright © Adriaan Zonnenberg. Distributed under the same terms as Vim itself. See :help license.