Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use if-lua by default (because of if-lua-corelibs.diff)

Thanks Luis Carvalho! :-)
  • Loading branch information...
commit 7bec1f49c6f12bbdde1f6d5a3470a9f66a8e34e2 1 parent 33f55f1
@xolox authored
Showing with 11 additions and 9 deletions.
  1. +3 −3 README.md
  2. +8 −6 luainspect.vim
View
6 README.md
@@ -16,7 +16,7 @@ When you open any Lua file the semantic highlighting should be enabled automatic
### The `:LuaInspect` command
-You shouldn't need to execute this command manually unless you've disabled automatic highlighting using the `g:lua_inspect_events` option. When you execute the `:LuaInspect` command the plug-in runs the LuaInspect tool and then highlights all variables in the current buffer using one of the following highlighting groups:
+You don't need to use this command unless you've disabled automatic highlighting using `g:lua_inspect_events`. When you execute this command the plug-in runs the LuaInspect tool and then highlights all variables in the current buffer using one of the following highlighting groups:
* <span style="color: #600000">luaInspectGlobalDefined</span>
* <span style="color: #FFF; background: #F00">luaInspectGlobalUndefined</span>
@@ -45,9 +45,9 @@ Note that this only works when the plug-in is loaded (or reloaded) *after* setti
### The `g:lua_inspect_internal` option
-The plug-in can use the Lua interface for Vim so it doesn't have to run LuaInspect as an external program (which can slow things down). This feature isn't enabled by default though, because the Lua interface for Vim doesn't include most of `io.*` and `os.*` from Lua's standard library, and this causes LuaInspect to flag all references to those modules as undefined global variables! If you want to enable use of the Lua interface for Vim despite this, you can add the following to your [vimrc script](http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc):
+The plug-in uses the Lua interface for Vim when available so that it doesn't have to run LuaInspect as an external program (which can slow things down). If you insist on running LuaInspect as an external program you can set this variable to false (0) in your [vimrc script](http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc):
- :let g:lua_inspect_internal = 1
+ :let g:lua_inspect_internal = 0
## Not yet implemented
View
14 luainspect.vim
@@ -2,7 +2,7 @@
" Author: Peter Odding <peter@peterodding.com>
" Last Change: August 7, 2010
" URL: http://peterodding.com/code/vim/lua-inspect/
-" Version: 0.1.8
+" Version: 0.1.9
" License: MIT
" Don't source the plug-in when its already been loaded or &compatible is set.
@@ -18,11 +18,13 @@ if !exists('g:lua_inspect_events')
endif
if !exists('g:lua_inspect_internal')
- " Set this to false (0) to run LuaInspect inside the Lua interface for Vim.
- " This makes it faster but less accurate because the Lua interface for Vim
- " doesn't include io.* and half of os.* which means LuaInspect marks them as
- " undefined globals...
- let g:lua_inspect_internal = 0
+ " Set this to false (0) to run LuaInspect as an external process instead of
+ " using the Lua interface for Vim. This makes it slower but might make it
+ " more accurate because the Lua interface for Vim didn't include io.* and
+ " os.* before the patch posted on 2010-07-28 which means LuaInspect would
+ " mark them as undefined globals. The patch I'm referring to is:
+ " http://groups.google.com/group/vim_dev/browse_frm/thread/9b77afa2fe4336c8
+ let g:lua_inspect_internal = has('lua')
endif
" The highlight groups and default styles/links defined by this plug-in.
Please sign in to comment.
Something went wrong with that request. Please try again.