aboutsummaryrefslogtreecommitdiff
path: root/autoload/sonictemplate/lang/java.vim
diff options
context:
space:
mode:
authorJagua <jagualitol@gmail.com>2016-02-05 00:12:29 +0900
committerJagua <jagualitol@gmail.com>2016-02-05 00:12:29 +0900
commit18bb045f65b29db60026f16d6eb3103068c5d943 (patch)
treea37ee6599b73cfabb2df7da518d4adad68001589 /autoload/sonictemplate/lang/java.vim
parent7f4a6694d6375d2148e91cea761d587aa60e7ad6 (diff)
downloadvim-sonictemplate-18bb045f65b29db60026f16d6eb3103068c5d943.tar.gz
vim-sonictemplate-18bb045f65b29db60026f16d6eb3103068c5d943.tar.bz2
vim-sonictemplate-18bb045f65b29db60026f16d6eb3103068c5d943.zip
Support linux
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 . ';'