diff options
Diffstat (limited to 'files/.vim/plugin/luarefvim.vim')
| -rwxr-xr-x | files/.vim/plugin/luarefvim.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/files/.vim/plugin/luarefvim.vim b/files/.vim/plugin/luarefvim.vim new file mode 100755 index 0000000..cb5664c --- /dev/null +++ b/files/.vim/plugin/luarefvim.vim @@ -0,0 +1,30 @@ +" luarefvim plugin +" This is somewhat based on CRefVim +" Maintainer: Luis Carvalho <lexcarvalho@gmail.com> +" Last Change: Jun, 3, 2005 +" Version: 0.2 + +" initial setup: avoid loading more than once +if exists("loaded_luarefvim") + finish +endif +let loaded_luarefvim = 1 + +" mappings: +vmap <silent> <unique> <Leader>lr y:call <SID>LookUp('<c-r>"')<CR> +nmap <silent> <unique> <Leader>lr :call <SID>LookUp(expand("<cword>"))<CR> +map <silent> <unique> <Leader>lc :help luaref<CR> + +function <SID>LookUp(str) + if a:str == "--" "comment? + silent! execute ":help lrv-comment" + elseif a:str == "" + silent! execute ":help luaref" + else + silent! execute ":help lrv-" . a:str + if v:errmsg != "" + echo "luarefvim: \`" . a:str . "\' not found" + endif + endif +endfunction + |
