Vim Textobj Methodcall Save

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

Project README

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.

Open Source Agenda is not affiliated with "Vim Textobj Methodcall" Project. README Source: thalesmello/vim-textobj-methodcall
Stars
33
Open Issues
1
Last Commit
3 years ago

Open Source Agenda Badge

Open Source Agenda Rating