开发工具 Vim 的 snippet 在输入 class 后出错?

alphaliu · April 25, 2012 · Last by AlphaLiu replied at April 25, 2012 · 3754 hits

我在输入 class 之后用 tab 键,然后就出错:

Error detected while processing function 
TriggerSnippet..snipMate#expandSnip..<SNR>67_ProcessSnippet: 
line    6: 
E117: Unknown function: Snippet_RubyClassNameFromFilename 
Press ENTER or type command to continue 


Then, after hitting ENTER, my ruby file has this:

1 class 0$ 
2 ~~$ 
3 end$ 


我在 OSX 下面使用的。

请教高手解决之道。

没有 load 这个文件 support_functions.vim?这个文件里有那个函数的定义:

.vim/snippets/support_functions.vim:2:function! Snippet_RubyClassNameFromFilename(...)

#1 楼 @yangyanhao 那要怎么 load 呢??不明白啊

我试试看别人的 load 法行不行。

OK 了,要在 vimrc 里面 source 一下这个文件

You need to Sign in before reply, if you don't have an account, please Sign up first.