Created
August 29, 2016 21:05
-
-
Save ryotako/d841ad7b6418233e4070670f7bfc0d63 to your computer and use it in GitHub Desktop.
Beamerのテーマを取得する自作ソース(パスベタ書き)
This file contains 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
" my unite source: beamer theme {{{ | |
let s:beamer_themes_path="/usr/local/texlive/2016/texmf-dist/tex/latex/beamer/themes/theme" | |
let s:unite_source = { | |
\ 'name': 'beamer_theme', | |
\ 'description': 'built-in LaTeX beamer themes', | |
\} | |
function! s:unite_source.gather_candidates(args, context) | |
let s:files = filter(split(system('ls '.s:beamer_themes_path)),'v:val =~# "^beamertheme\.\*\\.sty$"') | |
return map(s:files,'{ | |
\ "word": substitute(v:val[11:],"\.sty$","",""), | |
\ "source": "beamer_theme", | |
\ "kind": "word", | |
\}') | |
endfunction | |
call unite#define_source(s:unite_source) | |
unlet s:unite_source | |
"}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment