Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

Thanks Luis Carvalho! :-)
  • Loading branch information...
commit 7bec1f49c6f12bbdde1f6d5a3470a9f66a8e34e2 1 parent 33f55f1
Peter Odding authored August 08, 2010

Showing 2 changed files with 11 additions and 9 deletions. Show diff stats Hide diff stats

  1. 6  README.md
  2. 14  luainspect.vim
6  README.md
Source Rendered
@@ -16,7 +16,7 @@ When you open any Lua file the semantic highlighting should be enabled automatic
16 16
 
17 17
 ### The `:LuaInspect` command
18 18
 
19  
-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:
  19
+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:
20 20
 
21 21
  * <span style="color: #600000">luaInspectGlobalDefined</span>
22 22
  * <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
45 45
 
46 46
 ### The `g:lua_inspect_internal` option
47 47
 
48  
-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):
  48
+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):
49 49
 
50  
-    :let g:lua_inspect_internal = 1
  50
+    :let g:lua_inspect_internal = 0
51 51
 
52 52
 ## Not yet implemented
53 53
 
14  luainspect.vim
@@ -2,7 +2,7 @@
2 2
 " Author: Peter Odding <peter@peterodding.com>
3 3
 " Last Change: August 7, 2010
4 4
 " URL: http://peterodding.com/code/vim/lua-inspect/
5  
-" Version: 0.1.8
  5
+" Version: 0.1.9
6 6
 " License: MIT
7 7
 
8 8
 " 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')
18 18
 endif
19 19
 
20 20
 if !exists('g:lua_inspect_internal')
21  
-  " Set this to false (0) to run LuaInspect inside the Lua interface for Vim.
22  
-  " This makes it faster but less accurate because the Lua interface for Vim
23  
-  " doesn't include io.* and half of os.* which means LuaInspect marks them as
24  
-  " undefined globals...
25  
-  let g:lua_inspect_internal = 0
  21
+  " Set this to false (0) to run LuaInspect as an external process instead of
  22
+  " using the Lua interface for Vim. This makes it slower but might make it
  23
+  " more accurate because the Lua interface for Vim didn't include io.* and
  24
+  " os.* before the patch posted on 2010-07-28 which means LuaInspect would
  25
+  " mark them as undefined globals. The patch I'm referring to is:
  26
+  " http://groups.google.com/group/vim_dev/browse_frm/thread/9b77afa2fe4336c8
  27
+  let g:lua_inspect_internal = has('lua')
26 28
 endif
27 29
 
28 30
 " The highlight groups and default styles/links defined by this plug-in.

0 notes on commit 7bec1f4

Please sign in to comment.
Something went wrong with that request. Please try again.