vim-matchup
vim-matchup copied to clipboard
[Feature request] Add support for java language
trafficstars
Please (or how do I) add support for java keyword language:
- if/else
- do/while
- switch/case/default
Like in the SQL case, I cannot think of a way to handle this correctly with the current implementation using b:match_words regular expressions. The reason is there needs to be a definite end word. Sequences of matching words must come as begin:middle*:end, otherwise there is no way to know where to stop searching. Consider:
switch(x) {
case 1: break;
switch(x) {
case 2: break;
default: break;
}
{ case 3: break; } // allowed in C
}
I would somehow have to skip over the nested switch and hit case 3. Thus, this will have to wait until smarter "ending" is implemented. I think it should be possible after making changes intended for python support.