Skip to content

Commit

Permalink
Merge pull request #22 from Jagua/fix-path-sep-lang#java#util-package
Browse files Browse the repository at this point in the history
Support linux path separator
  • Loading branch information
mattn committed Feb 5, 2016
2 parents 7f4a669 + 18bb045 commit 0965a8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/sonictemplate/lang/java.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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 . ';'
Expand Down

0 comments on commit 0965a8e

Please sign in to comment.