h1mesuke / unite-outline

outline source for unite.vim
http://d.hatena.ne.jp/h1mesuke/20101107/p1
128 stars 61 forks source link

an error with compound filetype #1

Closed ujihisa closed 13 years ago

ujihisa commented 13 years ago

compound filetype(*1) でたとえばruby.rspecなfiletypeのbufferで:Unite outlineすると下記のようなエラーになりました。

function <SNR>49_call_unite_empty..unite#start..unite#force_redraw..<SN
R>28_redraw..<SNR>28_recache_candidates..91..unite#sources#outline#get_
outline_info, line 21
Vim(let):E121: Undefined variable: unite#sources#outline#ruby

(はじめ下記が牡蠣と変換されてしまいました。こんな寒い日は牡蠣の入った鍋などを食べたいですね。こちら外気-8Cでございます。)

*1 http://whileimautomaton.net/2008/09/07213145

h1mesuke commented 13 years ago

報告ありがとうございます。 filetype が compound filetype だった場合、 . で区切られたもののうち最も左のものを filetype として使用するように修正しました。

compound filetype が使われる場合、major.minor という風になってると思うので、それで問題ないはず。

というか、compound filetype、初めて知りました(汗

ujihisa commented 13 years ago

ばっちり動作しました!

compound filetypeはvimのhelpではっきりと言及されていないほど特殊なものなので使っていない人が多そうですが、実際に使ってみるとかなり便利な概念です。