Skip to content

Instantly share code, notes, and snippets.

@akiradeveloper
Created August 16, 2012 08:04
Show Gist options
  • Save akiradeveloper/3368212 to your computer and use it in GitHub Desktop.
Save akiradeveloper/3368212 to your computer and use it in GitHub Desktop.
haddockのbrowse_remoteが表示されないので調べる.
browserはw3mを指定してるのだけどこれが悪い?
悪くないと仮定してコードを読む.
function! s:browse(candidate, uri)
if exists('g:unite_source_haddock_browser')
call unite#util#system(printf('%s %s &', g:unite_source_haddock_browser, shellescape(a:uri)))
else
call unite#take_action('start', extend(deepcopy(a:candidate), { 'action__path': a:uri }))
endif
endfunction
unite#util#systemは,
call(s:V.system, a:000)
Vは,
vital#of('unite.vim')
vital#ofについて調べる.
autoload/vitalの中から.vitalというファイルを読み込んで, そのファイルをsplit(¥n)して, そのリストの先頭をverと呼び, そいつ(vital class)をnewして返す.
function! vital#of(name)
let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital')
let file = split(files, "\n")
if empty(file)
throw 'vital: version file not found: ' . a:name
endif
let ver = readfile(file[0], 'b')
if empty(ver)
throw 'vital: invalid version file: ' . a:name
endif
return vital#_{substitute(ver[0], '\W', '', 'g')}#new()
endfunction
unkofoxにしてみたらエラーが出た.
どうやらパスには入っているようだ. w3mとfirefoxではすでに実験していて, それらの場合にはこのようなエラーは出ない.
function unite#mappings#do_action..143..unite#mappings#do_action..148..<SNR>118_browse..unite#util#system..<SNR>48_system..vimproc#system..vimproc#system_bg..vimproc#popen3..<SNR>
80_plineopen..<SNR>80_convert_args..vimproc#get_command_name, line 15
vimproc#get_command_name: File "unkofox" is not found.
Error occured in executing action!
Action name is browse_remote
@akiradeveloper
Copy link
Author

最終的な報告は, Macからのsshではなくて, Gnome上でvimを立ち上げて, browserにfirefoxを指定するとUnite haddockした時にブラウザが立ち上がってマニュアルが出てきた. これはすごいのでぜひとも使いたいが, GUIがないと何も出来ないというのはどういうことか

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment