Skip to content

Latest commit

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

vim-textobj-methodcall

This plugin defines a methodcall text object for the vim-textobj-user plugin.

demo

Installing

With vim-plug:

Plug 'kana/vim-textobj-user' | Plug 'thalesmello/vim-textobj-methodcall'

Default mappings

  • am: around method call. Gets the method call of the surrounding scope.
  • im: inner method call. Gets the method call of the current scope.
  • aM: around method call chain. Gets the method call chain of the surrounding scope.
  • iM: inner method call chain. Gets the method call chain of the current scope.

Custom mappings

call textobj#user#map('methodcall', {
\ '-': {
\ 'select-a': 'ac',
\ 'select-i': 'ic',
\ },
\ 'chain': {
\ 'select-a': 'aC',
\ 'select-i': 'iC',
\ },
\ })
let g:textobj_methodcall_no_default_key_mappings = 1

For more details, look at the vim-textobj-user documentation.

About

A Vim text-object for either single or chained method calls.

Resources

Stars

31 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages