gist.vimとquickrun.vimでgistを実行
Gist {gist id} setf perl QuickRun
たったこれだけ。
2行目のはPerlならperl、Rubyならruby、など各言語によって変えてください。
さらにこの方法をgist.vimの作者であるid:mattnさんに言ったところ、
gist.vimで現在のfiletype(現在のハイライトなどを決める値)を検出してくれる設定があるらしい。
let g:gist_detect_filetype = 1
これを.vimrcに書いとけばfiletypeを教える必要がないので
Gist {gist id} QuickRun
だけでよくなる。
ちなみに - g:gist_detect_filetypeにセットする値の意味
gist.vimのコメントに書いてある説明引用してみる。
doc/ にhelpおかないのはインストールしやすいようにだろうか。*1
「:help でひける」ってけっこう重要だと思うので
個人的には一応用意しておいたほうがいいと思います。
" * if you want to detect filetype from gist's filename... " " # detect filetype if vim failed auto-detection. " let g:gist_detect_filetype = 1 " " # detect filetype always. " let g:gist_detect_filetype = 2
ようするにこういうことでしょうか。