1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:50:03 +08:00
SpaceVim/config/plugins/vim-ref.vim

32 lines
1.1 KiB
VimL
Raw Normal View History

2016-12-26 21:11:19 +08:00
let g:ref_source_webdict_sites = {
2017-03-06 23:26:26 +08:00
\ 'je': {
\ 'url': 'http://dictionary.infoseek.ne.jp/jeword/%s',
\ },
\ 'ej': {
\ 'url': 'http://dictionary.infoseek.ne.jp/ejword/%s',
\ },
\ 'wiki': {
\ 'url': 'http://ja.wikipedia.org/wiki/%s',
\ },
\ 'cn': {
\ 'url': 'http://www.iciba.com/%s',
\ },
\ 'wikipedia:en':{'url': 'http://en.wikipedia.org/wiki/%s', },
\ 'bing':{'url': 'http://cn.bing.com/search?q=%s', },
\ }
2016-12-26 21:11:19 +08:00
let g:ref_source_webdict_sites.default = 'cn'
"let g:ref_source_webdict_cmd='lynx -dump -nonumbers %s'
"let g:ref_source_webdict_cmd='w3m -dump %s'
"The filter on the output. Remove the first few lines
function! g:ref_source_webdict_sites.je.filter(output)
2017-03-06 23:26:26 +08:00
return join(split(a:output, "\n")[15 :], "\n")
2016-12-26 21:11:19 +08:00
endfunction
function! g:ref_source_webdict_sites.ej.filter(output)
2017-03-06 23:26:26 +08:00
return join(split(a:output, "\n")[15 :], "\n")
2016-12-26 21:11:19 +08:00
endfunction
function! g:ref_source_webdict_sites.wiki.filter(output)
2017-03-06 23:26:26 +08:00
return join(split(a:output, "\n")[17 :], "\n")
2016-12-26 21:11:19 +08:00
endfunction
2017-03-06 23:26:26 +08:00
" vim:set et sw=2: