neco-look をつかってみた, けど動かなかった その2
git-bisect してみた.
できれば、git-bisectなどを利用し、おかしくなったコミット番号まで調べてください
https://github.com/Shougo/neocomplcache/wiki/%E3%83%90%E3%82%B0%E5%A0%B1%E5%91%8A%E3%81%99%E3%82%8B%E9%9A%9B%E3%81%AB%E6%AC%B2%E3%81%97%E3%81%84%E6%83%85%E5%A0%B1%EF%BC%88%E6%9A%AB%E5%AE%9A%E7%89%88%EF%BC%89
- 特定のファイルタイプでおかしい場合、バグが再現する最小のソースファイル
- しかし, 初回使用時に動かないときはどこから調べればいいのか全くわからない.
- 適当に何回か good にして試してみた.
- テストは以下の方法で実施.
1. neco-look のソースをいじって, 動作していることを確認できるようにして,
function! s:source.get_keyword_list(cur_keyword_str) if !(neocomplcache#is_text_mode() || neocomplcache#within_comment()) \ || a:cur_keyword_str !~ '^[[:alpha:]]\+$' return [] endif let list = split(neocomplcache#util#system('look ' . a:cur_keyword_str), "\n") if neocomplcache#util#get_last_status() != 0 return [] endif + echo list return map(list, "{'word': v:val, 'menu': '[look]'}") endfunction
2. /tmp/a.tex ファイルに "% dictionar" と入力して動作するか確認
% git bisect start % git bisect bad % git bisect next Warning: bisecting only with a bad commit. Are you sure [Y/n]? Bisecting: 799 revisions left to test after this (roughly 10 steps) [6903163f96bfdbeb8d1914dbbcb7eea5721b52a5] - Implemented asyncronous caching in tags_complete. % git bisect good Bisecting: 399 revisions left to test after this (roughly 9 steps) [35d21c15a62765c2f7306fbcf65501dc307a1594] - Improved buffer cache behavior. % git bisect good Bisecting: 199 revisions left to test after this (roughly 8 steps) [1f69f24654348886efb5e03bc583dafda865ae32] - Improved examples. % vi /tmp/a.tex % git bisect good Bisecting: 99 revisions left to test after this (roughly 7 steps) [f2f08e89a82d4c82f1a099996be269f976bbbea7] - Fixed vim_complete error. % vi /tmp/a.tex % git bisect bad Bisecting: 49 revisions left to test after this (roughly 6 steps) [534c5d78694d6b931d944b223406dcb1ab04bc08] - Fixed cur_text problem. % vi /tmp/a.tex % git bisect good Bisecting: 22 revisions left to test after this (roughly 5 steps) [31c92e86044dcbdb64684eae26e0b4bd7a75a824] Merge pull request #286 from NagatoPain/request % vi /tmp/a.tex % git bisect good Bisecting: 11 revisions left to test after this (roughly 4 steps) [15626fdb3e0473980c08489858ed9e1cfaaf7290] - Changed g:neocomplcache_skip_auto_completion_time default value. % vi /tmp/a.tex % git bisect bad # neco-look is not called Bisecting: 5 revisions left to test after this (roughly 3 steps) [11bee798aca614c13577bf5a430593b984b19125] - Added g:neocomplcache_skip_auto_completion_time option. % vi /tmp/a.tex % git bisect bad # neco-look is not called Bisecting: 2 revisions left to test after this (roughly 1 step) [6f295190575d9d41f9762befcd043f5033589d7d] - Fixed neocomplcache enabled check. % vi /tmp/a.tex % git bisect good Bisecting: 0 revisions left to test after this (roughly 1 step) [54008209349b23caac215fbb7d91588a85d7c9aa] - Improved auto completion. % vi /tmp/a.tex % git bisect bad # neco-look is not called Bisecting: 0 revisions left to test after this (roughly 0 steps) [5f2ba9714c778ae1c11d7f266c7435f1b0c74a6f] - Fixed manual complete. % vi /tmp/a.tex % git bisect good 54008209349b23caac215fbb7d91588a85d7c9aa is the first bad commit commit 54008209349b23caac215fbb7d91588a85d7c9aa Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Sun Oct 14 07:16:17 2012 +0900 - Improved auto completion. :040000 040000 9872eaf61992abcc04c4a09369d64502c60ebe3d b1284212788b218223d3cc679d424567da0c5be8 M autoload :040000 040000 0ffb2610b60cc752c47ba7cfc800fe3ce63e6e67 e79cfac62fadd8ab952233a0deca8192e74317f1 M doc
ここかな?
2012-10-18
- Fixed skip auto completion behavior.
2012-10-15
- Improved skip auto completion.
2012-10-14
- Improved auto completion.
- 10/18 に何か fix したと書いてあるけど, このバージョンでも補完候補がでてこなかった.
- 途中で bad になっているところでも, neco-look が呼ばれる場所と呼ばれない場合があった.
- neco-look が call されない場合を good 扱いするとここになった.
Bisecting: 11 revisions left to test after this (roughly 4 steps) [15626fdb3e0473980c08489858ed9e1cfaaf7290] - Changed g:neocomplcache_skip_auto_completion_time default value. % vi /tmp/a.tex % git bisect good # neco-look is not called Bisecting: 5 revisions left to test after this (roughly 3 steps) [01a0ab752b6da7b4e5f55564d8e52648010a3c4b] - copy list. % vi /tmp/a.tex % git bisect bad Bisecting: 2 revisions left to test after this (roughly 2 steps) [2857e06e562f0b25112b6d0039b07c94e59b5cf9] - Added neocomplcache#initialize(). % vi /tmp/a.tex % git bisect bad Bisecting: 0 revisions left to test after this (roughly 1 step) [4d35ff643598008b46c5e3c3b23fa7fb9383c714] - Changed skip completion time. % vi /tmp/a.tex % git bisect bad Bisecting: 0 revisions left to test after this (roughly 0 steps) [88f484248a46991e797643bcbbd99492ed056616] - Improved skip auto completion. % vi /tmp/a.tex % git bisect bad 88f484248a46991e797643bcbbd99492ed056616 is the first bad commit commit 88f484248a46991e797643bcbbd99492ed056616 Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Mon Oct 15 10:47:07 2012 +0900 - Improved skip auto completion. :040000 040000 053476da6685cfe36528f4d39d8364878fc9600c 72c3bbc3427dfe3a6dc29687a15bb56f21dde250 M autoload :040000 040000 a3fb0248ccea54a3cfafdab41a97763124d04576 415f1c2eb8d9a9fd3ed4159985a1e02e06c1220b M doc
確認できたこと.
- Ubuntu + vim7.2
- \in とうつと, \input とかの候補がでてきて, neocomplcache は動作する.
- neocomplcache#is_text_mode() は 1 を返す
- neocomplcache#system('look hel') はコマンド実行時と同じ結果を返す
- neco-look の printf デバッグにより, 以下の関数が候補のリストを復帰していることは確認できた.
function! s:source.get_keyword_list(cur_keyword_str)
- 過去動作しているところは確認できたので設定誤りとかではなさそう.
- "alias vi vim" しています