mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 03:00:06 +08:00
37 lines
1.3 KiB
VimL
37 lines
1.3 KiB
VimL
let g:ref_source_webdict_sites = {
|
|
\ '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', },
|
|
\ }
|
|
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)
|
|
return join(split(a:output, "\n")[15 :], "\n")
|
|
endfunction
|
|
function! g:ref_source_webdict_sites.ej.filter(output)
|
|
return join(split(a:output, "\n")[15 :], "\n")
|
|
endfunction
|
|
function! g:ref_source_webdict_sites.wiki.filter(output)
|
|
return join(split(a:output, "\n")[17 :], "\n")
|
|
endfunction
|
|
nnoremap <Leader>rj :<C-u>Ref webdict je<Space>
|
|
nnoremap <Leader>re :<C-u>Ref webdict ej<Space>
|
|
nnoremap <Leader>rc :<C-u>Ref webdict cn<Space>
|
|
nnoremap <Leader>rw :<C-u>Ref webdict wikipedia:en<Space>
|
|
nnoremap <Leader>rb :<C-u>Ref webdict bing<Space>
|
|
|
|
" vim:set et sw=2:
|