vim-textobj-functioncall
vim-textobj-functioncall copied to clipboard
Doesn't work with Module.Function(a,b)
Hello!
Great work with the plugin! Thanks for sharing.
I've been testing it and noticed that it only works for the function call itself, but if the function is part of a class or module it doesn't. Like MyClass.my_function(a, b)
Are you willing to include it as well in this plugin? If so I could help with writing a PR for this.
Hi, sorry for my late response.
Let me make sure, just in case.
- It should work for the whole body of
MyClass.my_function(a, b)when the cursor is on somewhere on it. - It should work for
my_function(a, b)even when the cursor is onMyClass. Which do you want (or other)?
FYI, you can customize "what is a function" via textobj_functioncall_patterns.
let g:textobj_functioncall_patterns = [
\ {
\ 'header' : '\<\%(\h\k*\.\)*\h\k*',
\ 'bra' : '(',
\ 'ket' : ')',
\ 'footer' : '',
\ },
\ ]