2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vim-clap で MRU

Last updated at Posted at 2019-11-18

ポップアップウィンドウで CtrlP や unite や Denite のように fuzzy マッチしてくれる vim-clap が、だいぶ使い勝手が良くなってきました。
MRU も vim-clap で使ってみたいと思い始めたのですが、あいにくまだない provider (そう呼ぶらしい)のようです。

ということで CtrlP の MRU で使用しているファイルを clap-vim から使うようにしてみました。

let g:clap_provider_mru = {
      \   'source': filter(readfile(expand('~/_vim/.ctrlp/mru/cache.txt')), { i, x -> filereadable(x) }),
      \   'sink': 'edit',
      \}

Ctrlp と vim-clap を使っていれば、このような設定を .vimrc に加えると :Clap mru で clap-vim が MRU を使えるようになります。

追記

この設定だと読み込むファイルが変更されても、:Clap mru には反映されないみたい。
意図した結果なのか、バグなのか?

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?