vim-argumentative
vim-argumentative copied to clipboard
arbitrary list without delimiters
Your plugin only works if the comma separated list is inside two delimiters (such as parentheses). Which is just, as it is only supposed to work for function arguments.
However, it were great if it would work in an arbitrary comma separated list such as apple, pie, raspberry (or even apple, pie and raspberry) ?
I hope to eventually support a way to allow customization of start, middle, and end boundary regexes per filetype. However I have been hesitant as because I feel like people want a plugin that "just works" for function arguments and I do not want to add complexity nor do I know the level of interest in arbitrary boundaries.
Your request its self provides some quirks that would tricky to figure out:
- Should it be limited to the serial comma (foo, bar, and baz)
- What about oxford commas (foo, bar and baz)?
- How can we find the start and end boundaries when using multi-word list items (Jane owns a blue pen, a green chair, and a yellow shirt.)
I feel like the problem space is very big when we start to add english text. Although I agree with you, it would be nice.
This is an important feature to allow easily moving parameters in constructor initialization lists in C++. The general syntax is:
Foo::Foo(int a, int b, int c) : a_(a), b_(b), c_(c) {}
so the delimiters are ":" on the left and "{" on the right. But doing it without delimiters would also be fine.