Created
November 24, 2010 08:09
-
-
Save mizchi/713310 to your computer and use it in GitHub Desktop.
howmのタイトル一覧を取得
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #howmを使っているならhowm_dirが定義されているはず | |
| let howm_dir="~/Dropbox/memo" | |
| let s:unite_howm = { | |
| \ 'name': 'howm', | |
| \ 'howm_dir': howm_dir, | |
| \ } | |
| function! s:unite_howm.gather_candidates(args, context) | |
| let lines = split(system("grep ^= " . s:unite_howm.howm_dir . "/*/*/*" ), "\n") | |
| " let lines = split(system("grep ^= " . "~/Dropbox/memo/*/*/*" ), "\n") | |
| " let lines = split(system(printf("%s%s%s", "grep ^= " , howm_dir , "\/*/*/*") ), "\n") | |
| let path = expand('#:p') | |
| let format = '%' . strlen(len(lines)) . 'd: %s`' | |
| return map(lines, '{ | |
| \ "word": split(v:val, ":")[1] , | |
| \ "source": "howm", | |
| \ "kind": "jump_list", | |
| \ "action__path": split(v:val, ":")[0], | |
| \ }') | |
| endfunction | |
| call unite#define_source(s:unite_howm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment