You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function name() {
....
}
name() {
...
}
function name {
...
}
I copied after/ftplugin/c to after/ftplugin/sh and everything works except the thrid case with iF, af, aF. if works.
I tried to look into the regex used in c.vim but I quickly got overwhelmed.
What would it take for sh support to work for the third case as well?
Also, since c style functions may be used in other languages as well and in general there might be overlap between languages, it would be nice to have mechanism to alias filetypes. Sth like:
let g:textobj_function_aliases = {'sh': 'c'}
The text was updated successfully, but these errors were encountered:
An alias or alike would be indeed nice. I would for example like to add R support, the function definition is identical to C, but it feels wasteful to duplicate the C files in a PR. Or is this the desired behaviour?
There are 3 ways to implement a function:
I copied
after/ftplugin/c
toafter/ftplugin/sh
and everything works except the thrid case withiF, af, aF
.if
works.I tried to look into the regex used in c.vim but I quickly got overwhelmed.
What would it take for
sh
support to work for the third case as well?Also, since
c
style functions may be used in other languages as well and in general there might be overlap between languages, it would be nice to have mechanism to alias filetypes. Sth like:The text was updated successfully, but these errors were encountered: