diff options
author | Jagua <jagualitol@gmail.com> | 2019-03-15 01:31:25 +0900 |
---|---|---|
committer | Jagua <jagualitol@gmail.com> | 2019-03-15 01:31:25 +0900 |
commit | ae8e1818efe27bb946fd948fc2fe8cc3f38e0e2d (patch) | |
tree | 3d96e37be0b782bda7edb5ab86b04df7fc1c237f /autoload | |
parent | 6bd13f1565dcad774b758515e6854d0ce91d8b37 (diff) | |
download | vim-sonictemplate-ae8e1818efe27bb946fd948fc2fe8cc3f38e0e2d.tar.gz vim-sonictemplate-ae8e1818efe27bb946fd948fc2fe8cc3f38e0e2d.tar.bz2 vim-sonictemplate-ae8e1818efe27bb946fd948fc2fe8cc3f38e0e2d.zip |
Add more escape
I believe that escape() is necessary at 3rd argument of substitute().
example:
```go
"%v",&P{}.log
```
and type `<C-y><C-b>`
actual:
```go
log.Println("%v",{{$1}}P{})
```
expect:
```go
log.Println("%v",&P{})
```
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/sonictemplate.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim index 913d7d3..9397efa 100644 --- a/autoload/sonictemplate.vim +++ b/autoload/sonictemplate.vim @@ -340,7 +340,7 @@ function! sonictemplate#postfix() return '' endif let line = getline('.')[:col('.')] - let line = escape(line, '\') + let line = escape(line, '\&') for k in keys(s:pat[s:get_raw_filetype()]) let m = matchstr(line, k) if len(m) > 0 |