From 06ae5e977eab17938329ada2853c27e55230e45a Mon Sep 17 00:00:00 2001 From: Alexey Balchunas Date: Sat, 5 Sep 2015 12:45:04 +0700 Subject: [PATCH] Make package parsing work for groovy --- autoload/vebugger/jdb.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/vebugger/jdb.vim b/autoload/vebugger/jdb.vim index 612336c..2279c8b 100644 --- a/autoload/vebugger/jdb.vim +++ b/autoload/vebugger/jdb.vim @@ -114,7 +114,8 @@ endfunction function! s:getClassNameFromFile(filename) let l:className=fnamemodify(a:filename,':t:r') " Get only the name of the file, without path or extension for l:line in readfile(a:filename) - let l:matches=matchlist(l:line,'\vpackage\s+(%(\w|\.)+)\s*;') + " trailing ; is optional to make it work for groovy as well + let l:matches=matchlist(l:line,'\vpackage\s+(%(\w|\.)+)\s*;?') if 1