aboutsummaryrefslogtreecommitdiff
path: root/autoload/sonictemplate/lang/java.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/sonictemplate/lang/java.vim')
-rw-r--r--autoload/sonictemplate/lang/java.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/sonictemplate/lang/java.vim b/autoload/sonictemplate/lang/java.vim
index eca4201..310adc4 100644
--- a/autoload/sonictemplate/lang/java.vim
+++ b/autoload/sonictemplate/lang/java.vim
@@ -2,7 +2,7 @@ function! sonictemplate#lang#java#util(name) abort
if a:name == 'package'
let fn = expand('%:p:h')
let fn = fn[len(s:project_root())+1:]
- let fn = substitute(fn, '\\', '.', 'g')
+ let fn = substitute(fn, '[\\/]', '.', 'g')
let fn = substitute(fn, '^\(src\.main\.java\.\|src\.\)', '', '')
if fn != ""
return 'package ' . fn . ';'