Skip to content

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

Notifications You must be signed in to change notification settings

thalesmello/vim-textobj-methodcall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published