mirror of
https://github.com/gryf/snipmate.vim.git
synced 2026-02-18 15:15:45 +01:00
temporarily removed nested snippets while I sort out the bugs
This commit is contained in:
@@ -136,10 +136,6 @@ fun! TriggerSnippet()
|
|||||||
call s:GetSuperTabSID()
|
call s:GetSuperTabSID()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('s:snipPos') && s:endSnip == s:snipPos[s:curPos][1]+s:snipPos[s:curPos][2]
|
|
||||||
return s:JumpTabStop() " Don't treat placeholder text as a trigger.
|
|
||||||
endif
|
|
||||||
|
|
||||||
let word = matchstr(getline('.'), '\S\+\%'.col('.').'c')
|
let word = matchstr(getline('.'), '\S\+\%'.col('.').'c')
|
||||||
for scope in [bufnr('%')] + split(&ft, '\.') + ['_']
|
for scope in [bufnr('%')] + split(&ft, '\.') + ['_']
|
||||||
let trigger = s:GetSnippet(word, scope)
|
let trigger = s:GetSnippet(word, scope)
|
||||||
@@ -212,15 +208,6 @@ fun s:ExpandSnippet(col)
|
|||||||
let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1
|
let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1
|
||||||
call append(lnum, map(snip[1:], "'".strpart(line, 0, indent - 1)."'.v:val"))
|
call append(lnum, map(snip[1:], "'".strpart(line, 0, indent - 1)."'.v:val"))
|
||||||
|
|
||||||
if exists('s:snipPos') && stridx(s:snippet, '${1') != -1
|
|
||||||
if exists('s:update')
|
|
||||||
call s:UpdateSnip(len(snip[-1]) - len(afterCursor))
|
|
||||||
call s:UpdatePlaceholderTabStops()
|
|
||||||
else
|
|
||||||
call s:UpdateTabStops(len(snip) - 1, len(snip[-1]) - len(afterCursor))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
let snipLen = s:BuildTabStops(lnum, col - indent, indent)
|
let snipLen = s:BuildTabStops(lnum, col - indent, indent)
|
||||||
unl s:snippet
|
unl s:snippet
|
||||||
|
|
||||||
@@ -336,11 +323,7 @@ fun s:BuildTabStops(lnum, col, indent)
|
|||||||
let i += 1
|
let i += 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
if exists('s:snipPos') " Build a nested snippet
|
let s:snipPos = snipPos
|
||||||
let s:snipPos = extend(s:snipPos, snipPos, s:curPos + 1)
|
|
||||||
else
|
|
||||||
let s:snipPos = snipPos
|
|
||||||
endif
|
|
||||||
return i - 1
|
return i - 1
|
||||||
endf
|
endf
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user