在~/.vimrc中加入这些:
function! Mydict() let expl=system('sdcv -n ' . \ expand("<cword>")) windo if \ expand("%")=="diCt-tmp" | \ q!|endif 25vsp diCt-tmp setlocal buftype=nofile bufhidden=hide noswapfile 1s/^/\=expl/ 1 endfunction nmap F :call Mydict()<CR>
在单词上使用Shift+f ,效果:
转载于:https://blog.51cto.com/dongyulong/458320