From da709cd9e90c3ab644bb92700f0ed40d965b80d3 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Thu, 13 Oct 2011 11:17:19 +0600 Subject: Initial commit. --- files/.vim/plugin/luarefvim.vim | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 files/.vim/plugin/luarefvim.vim (limited to 'files/.vim/plugin/luarefvim.vim') 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 +" 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 lr y:call LookUp('"') +nmap lr :call LookUp(expand("")) +map lc :help luaref + +function 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 + -- cgit v1.2.3