There exists a plugin for vim to do just this. Given this your example code:
public static void main(String[] args
{
System.out.println("Foobar");
}
Wherever you place your cursor, the closest back mismatched parentheses will be highlighted. The only defect is that it doesn't look ahead, to see if it is matched later. So if you were within the pringln parentheses if would highlight the opening one. It is basically functional and should serve you fine.
It is called vim-matchopen and can be found at https://github.com/arnar/vim-matchopen
If you havn't had expirence installing vim plugins, here is a quick intro for this one. (I am assuming that you are using Linux.)
Go to the download site. If you have git and know how to use it, go ahead. If not then use the download zip button, and extract the downloaded zip to some temporary destination.
Next you need to take the script plugin/matchopen.vim
and place it in the directory ~/.vim/plugin
. If that directory doesn't exist, create it.
That should be it. Then you will be up and running. Just restart vim.
This would be nice, though I doubt we will see a solution since the default would be the same next close peren, so the missing one after String[] would be assumed as the one after since VIM doesn't know that's not an argument. – nerdwaller – 2013-02-02T01:35:27.580