How do I get Vim to know the Java 8 lambda syntax?
1 answer
Create a file in ~/.vim/after/syntax
named java.vim
and add the following to that file:
syn clear javaError
syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/"
syn match javaFuncDef "[^-]->"
The second line is copied from the standard java syntax file, but without
[^-]->
For more information on the catalog, ~/.vim/after/
see :help after-directory
.
+9
source to share