1

I was using snimpmate with vim-snippets plugin, and all fine. Until i tried to remove the vim-snippets and use my custom and only snippets 'ruby.snippets' on '.vim/snippets'. i think the snippets are being loaded just when fire TAB or whatever trigger it just removes the text... and leave blank space.

def hello

 if |TAB|

end

results in

def hello

end

is the same problem here

4

1 に答える 1

1

トラブルシューティングに役立つ情報をほとんど提供しません。現在定義されているスニペットにアクセスできるようにする1 つの関数 (私のSnippetCompleteSnipMate プラグインから) を次に示します。

そのスニペットにアクセスできるようにするには、snipMate にパッチを適用する必要があります。~/.vim/plugin/snipMate.vim下部に次の関数を開いて挿入します。

fun! GetSnipsInCurrentScope()
    let snips = {}
    for scope in [bufnr('%')] + split(&ft, '\.') + ['_']
        call extend(snips, get(s:snippets, scope, {}), 'keep')
        call extend(snips, get(s:multi_snips, scope, {}), 'keep')
    endfor
    return snips
endf

を介して、現在のバッファにどのスニペットが定義されているかを確認できるようになりました

:echo keys(GetSnipsInCurrentScope())
于 2014-04-22T06:58:06.280 に答える