aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-26 02:07:40 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-26 02:07:40 +0900
commitbb2d8561f8d75cff067853af72cb74ae3c441cc6 (patch)
treed56f06f653db27be3a84075adb61f5f4464bb279 /autoload
parent13dabdeefdd69d53e68bf9d2f70bdc130d0f5130 (diff)
downloadvim-sonictemplate-bb2d8561f8d75cff067853af72cb74ae3c441cc6.tar.gz
vim-sonictemplate-bb2d8561f8d75cff067853af72cb74ae3c441cc6.tar.bz2
vim-sonictemplate-bb2d8561f8d75cff067853af72cb74ae3c441cc6.zip
Add json
Diffstat (limited to 'autoload')
-rw-r--r--autoload/sonictemplate.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index f411ada..14838cb 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.vim
@@ -170,7 +170,7 @@ function! sonictemplate#getvar(name) abort
endfunction
function! s:dir() abort
- let l:name = expand('%:t:r:')
+ let l:name = expand('%:p:h:t:r')
if empty(l:name)
let l:name = fnamemodify(getcwd(), ':t')
endif
@@ -178,7 +178,7 @@ function! s:dir() abort
endfunction
function! s:name(default) abort
- let l:name = expand('%:t:r:')
+ let l:name = expand('%:t:r')
if empty(l:name)
let l:name = a:default
endif