Skip to content

Commit ebf637d

Browse files
committed
Document vim-misc as external dependency (needs to be installed separately from now on)
1 parent a83d240 commit ebf637d

File tree

3 files changed

+76
-28
lines changed

3 files changed

+76
-28
lines changed

INSTALL.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
If you're looking for the simplest way to get the plug-in up and running, download [the latest ZIP archive](http://peterodding.com/code/vim/downloads/lua-inspect.zip) from [Vim Online](http://www.vim.org/scripts/script.php?script_id=3169), unzip that in `~/.vim/` (on UNIX) or `%USERPROFILE%\vimfiles` (on Windows) and you're good to go.
1+
*Please note that the vim-lua-inspect plug-in requires my vim-misc plug-in which is separately distributed.*
22

3-
If you're using git and/or [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332), [Vundle](https://github.com/gmarik/vundle) or a similar plug-in manager and want to keep the plug-in up to date using git, you can use the GitHub repository directly, it should just work.
3+
Unzip the most recent ZIP archives of the [vim-lua-inspect] [download-lua-inspect] and [vim-misc] [download-misc] plug-ins inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows).
4+
5+
If you prefer you can also use [Pathogen] [pathogen], [Vundle] [vundle] or a similar tool to install & update the [vim-lua-inspect] [github-lua-inspect] and [vim-misc] [github-misc] plug-ins using a local clone of the git repository.
6+
7+
8+
[download-lua-inspect]: http://peterodding.com/code/vim/downloads/lua-inspect.zip
9+
[download-misc]: http://peterodding.com/code/vim/downloads/misc.zip
10+
[github-lua-inspect]: http://github.com/xolox/vim-lua-inspect
11+
[github-misc]: http://github.com/xolox/vim-misc
12+
[pathogen]: http://www.vim.org/scripts/script.php?script_id=2332
13+
[vundle]: https://github.com/gmarik/vundle

README.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
# Semantic highlighting for Lua in Vim
22

3-
The Vim plug-in `luainspect.vim` uses the [LuaInspect](http://lua-users.org/wiki/LuaInspect) tool to (automatically) perform semantic highlighting of variables in Lua source code. It was inspired by [lua2-mode](http://www.enyo.de/fw/software/lua-emacs/lua2-mode.html) (for [Emacs](http://www.gnu.org/software/emacs/)) and the [SciTE](http://www.scintilla.org/SciTE.html) plug-in included with LuaInspect. In addition to the semantic highlighting the following features are currently supported:
3+
The Vim plug-in `luainspect.vim` uses the [LuaInspect] [lua-inspect] tool to (automatically) perform semantic highlighting of variables in Lua source code. It was inspired by [lua2-mode] [lua2-mode] (for [Emacs] [emacs]) and the [SciTE] [scite] plug-in included with LuaInspect. In addition to the semantic highlighting the following features are currently supported:
44

55
* Press `<F2>` with the text cursor on a variable and the plug-in will prompt you to rename the variable.
66

77
* Press `gd` (in normal mode) with the text cursor on a variable and you'll jump to its declaration / first occurrence.
88

99
* When you hover over a variable with the mouse cursor in graphical Vim, information about the variable is displayed in a tooltip.
1010

11-
* If the text cursor is on a variable while the highlighting is refreshed then all occurrences of the variable will be marked in the style of [Vim's cursorline option](http://vimdoc.sourceforge.net/htmldoc/options.html#%27cursorline%27).
11+
* If the text cursor is on a variable while the highlighting is refreshed then all occurrences of the variable will be marked in the style of [Vim's cursorline option] [cursorline].
1212

1313
* When luainspect reports a wrong argument count for a function call the text will be highlighted with a green underline. When you hover over the highlighted text a tooltip shows the associated warning message.
1414

15-
* When LuaInspect reports warnings about unused variables, wrong argument counts, etc. they are shown in a [location list window](http://vimdoc.sourceforge.net/htmldoc/quickfix.html#location-list).
15+
* When LuaInspect reports warnings about unused variables, wrong argument counts, etc. they are shown in a [location list window] [location-list].
1616

1717
* When a syntax error is found (during highlighting or using the rename functionality) the lines where the error is reported will be marked like a spelling error.
1818

1919
![Screenshot of semantic highlighting](http://peterodding.com/code/vim/luainspect/screenshot.png)
2020

2121
## Installation
2222

23-
Unzip the most recent [ZIP archive](http://peterodding.com/code/vim/downloads/lua-inspect.zip) file inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). Now try it out: Edit a Lua file and within a few seconds semantic highlighting should be enabled automatically!
23+
*Please note that the vim-lua-inspect plug-in requires my vim-misc plug-in which is separately distributed.*
2424

25-
Note that on Windows a command prompt window pops up whenever LuaInspect is run as an external process. If this bothers you then you can install my [shell.vim](http://peterodding.com/code/vim/shell/) plug-in which includes a [DLL](http://en.wikipedia.org/wiki/Dynamic-link_library) that works around this issue. Once you've installed both plug-ins it should work out of the box!
25+
Unzip the most recent ZIP archives of the [vim-lua-inspect] [download-lua-inspect] and [vim-misc] [download-misc] plug-ins inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows).
26+
27+
If you prefer you can also use [Pathogen] [pathogen], [Vundle] [vundle] or a similar tool to install & update the [vim-lua-inspect] [github-lua-inspect] and [vim-misc] [github-misc] plug-ins using a local clone of the git repository.
28+
29+
Now try it out: Edit a Lua file and within a few seconds semantic highlighting should be enabled automatically!
30+
31+
Note that on Windows a command prompt window pops up whenever LuaInspect is run as an external process. If this bothers you then you can install my [shell.vim] [vim-shell] plug-in which includes a [DLL] [dll] that works around this issue. Once you've installed both plug-ins it should work out of the box!
2632

2733
## Usage
2834

@@ -45,7 +51,7 @@ You don't need to use this command unless you've disabled automatic highlighting
4551
* <span style="border-bottom: 1px dotted green">luaInspectWrongArgCount</span>
4652
* <span style="border-bottom: 1px dotted red">luaInspectSyntaxError</span>
4753

48-
If you don't like one or more of the default styles the Vim documentation [describes how to change them](http://vimdoc.sourceforge.net/htmldoc/syntax.html#:hi-default). If you want to disable the semantic highlighting in a specific Vim buffer execute `:LuaInspect!` in that buffer. When you want to re-enable the highlighting execute `:LuaInspect` again, but now without the [bang](http://vimdoc.sourceforge.net/htmldoc/map.html#:command-bang).
54+
If you don't like one or more of the default styles the Vim documentation [describes how to change them] [hi-default]. If you want to disable the semantic highlighting in a specific Vim buffer execute `:LuaInspect!` in that buffer. When you want to re-enable the highlighting execute `:LuaInspect` again, but now without the [bang (!)] [bang].
4955

5056
### The `:LuaInspectToggle` command
5157

@@ -60,19 +66,19 @@ By default the semantic highlighting and the warning messages in the location li
6066

6167
### The `g:loaded_luainspect` option
6268

63-
This variable isn't really an option but if you want to avoid loading the `luainspect.vim` plug-in you can set this variable to any value in your [vimrc script](http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc):
69+
This variable isn't really an option but if you want to avoid loading the `luainspect.vim` plug-in you can set this variable to any value in your [vimrc script] [vimrc]:
6470

6571
:let g:loaded_luainspect = 1
6672

6773
### The `g:lua_inspect_warnings` option
6874

69-
When LuaInspect reports warnings about unused variables, wrong argument counts, etc. they are automatically shown in a [location list window](http://vimdoc.sourceforge.net/htmldoc/quickfix.html#location-list). If you don't like this add the following to your [vimrc script](http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc):
75+
When LuaInspect reports warnings about unused variables, wrong argument counts, etc. they are automatically shown in a [location list window] [location-list]. If you don't like this add the following to your [vimrc script] [vimrc]:
7076

7177
:let g:lua_inspect_warnings = 0
7278

7379
### The `g:lua_inspect_events` option
7480

75-
By default semantic highlighting is automatically enabled after a short timeout and when you save a buffer. If you want to disable automatic highlighting altogether add the following to your [vimrc script](http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc):
81+
By default semantic highlighting is automatically enabled after a short timeout and when you save a buffer. If you want to disable automatic highlighting altogether add the following to your [vimrc script] [vimrc]:
7682

7783
:let g:lua_inspect_events = ''
7884

@@ -84,18 +90,36 @@ Note that this only works when the plug-in is loaded (or reloaded) *after* setti
8490

8591
### The `g:lua_inspect_internal` option
8692

87-
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):
93+
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] [vimrc]:
8894

8995
:let g:lua_inspect_internal = 0
9096

9197
## Contact
9298

93-
If you have questions, bug reports, suggestions, etc. the author can be contacted at <peter@peterodding.com>. The latest version is available at <http://peterodding.com/code/vim/lua-inspect/> and <http://github.com/xolox/vim-lua-inspect>. If you like this plug-in please vote for it on [Vim Online](http://www.vim.org/scripts/script.php?script_id=3169).
99+
If you have questions, bug reports, suggestions, etc. the author can be contacted at <peter@peterodding.com>. The latest version is available at <http://peterodding.com/code/vim/lua-inspect/> and <http://github.com/xolox/vim-lua-inspect>. If you like this plug-in please vote for it on [Vim Online] [vim-online].
94100

95101
## License
96102

97-
This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
103+
This software is licensed under the [MIT license] [mit].
98104
© 2013 Peter Odding &lt;<peter@peterodding.com>&gt;.
99105

100106

107+
[bang]: http://vimdoc.sourceforge.net/htmldoc/map.html#:command-bang
108+
[cursorline]: http://vimdoc.sourceforge.net/htmldoc/options.html#%27cursorline%27
109+
[dll]: http://en.wikipedia.org/wiki/Dynamic-link_library
110+
[download-lua-inspect]: http://peterodding.com/code/vim/downloads/lua-inspect.zip
111+
[download-misc]: http://peterodding.com/code/vim/downloads/misc.zip
112+
[emacs]: http://www.gnu.org/software/emacs/
113+
[github-lua-inspect]: http://github.com/xolox/vim-lua-inspect
114+
[github-misc]: http://github.com/xolox/vim-misc
115+
[hi-default]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#:hi-default
116+
[location-list]: http://vimdoc.sourceforge.net/htmldoc/quickfix.html#location-list
117+
[lua-inspect]: http://lua-users.org/wiki/LuaInspect
118+
[lua2-mode]: http://www.enyo.de/fw/software/lua-emacs/lua2-mode.html
119+
[mit]: http://en.wikipedia.org/wiki/MIT_License
120+
[pathogen]: http://www.vim.org/scripts/script.php?script_id=2332
121+
[scite]: http://www.scintilla.org/SciTE.html
122+
[vim-online]: http://www.vim.org/scripts/script.php?script_id=3169
123+
[vim-shell]: http://peterodding.com/code/vim/shell/
101124
[vimrc]: http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
125+
[vundle]: https://github.com/gmarik/vundle

doc/luainspect.txt

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,24 @@ following features are currently supported:
5656
*luainspect-installation*
5757
Installation ~
5858

59-
Unzip the most recent ZIP archive [6] file inside your Vim profile directory
60-
(usually this is '~/.vim' on UNIX and '%USERPROFILE%\vimfiles' on Windows),
61-
restart Vim and execute the command ':helptags ~/.vim/doc' (use ':helptags
62-
~\vimfiles\doc' instead on Windows). Now try it out: Edit a Lua file and
63-
within a few seconds semantic highlighting should be enabled automatically!
59+
Please note that the vim-lua-inspect plug-in requires my vim-misc plug-in
60+
which is separately distributed.
61+
62+
Unzip the most recent ZIP archives of the vim-lua-inspect [6] and vim-misc [7]
63+
plug-ins inside your Vim profile directory (usually this is '~/.vim' on UNIX
64+
and '%USERPROFILE%\vimfiles' on Windows), restart Vim and execute the command
65+
':helptags ~/.vim/doc' (use ':helptags ~\vimfiles\doc' instead on Windows).
66+
67+
If you prefer you can also use Pathogen [8], Vundle [9] or a similar tool to
68+
install & update the vim-lua-inspect [10] and vim-misc [11] plug-ins using a
69+
local clone of the git repository.
70+
71+
Now try it out: Edit a Lua file and within a few seconds semantic highlighting
72+
should be enabled automatically!
6473

6574
Note that on Windows a command prompt window pops up whenever LuaInspect is
6675
run as an external process. If this bothers you then you can install my
67-
shell.vim [7] plug-in which includes a DLL [8] that works around this issue.
76+
shell.vim [12] plug-in which includes a DLL [13] that works around this issue.
6877
Once you've installed both plug-ins it should work out of the box!
6978

7079
===============================================================================
@@ -111,7 +120,7 @@ If you don't like one or more of the default styles the Vim documentation
111120
describes how to change them (see |:hi-default|). If you want to disable the
112121
semantic highlighting in a specific Vim buffer execute ':LuaInspect!' in that
113122
buffer. When you want to re-enable the highlighting execute |:LuaInspect|
114-
again, but now without the bang (see |:command-bang|).
123+
again, but now without the bang (!) (see |:command-bang|).
115124

116125
-------------------------------------------------------------------------------
117126
The *:LuaInspectToggle* command
@@ -183,14 +192,14 @@ Contact ~
183192
If you have questions, bug reports, suggestions, etc. the author can be
184193
contacted at peter@peterodding.com. The latest version is available at
185194
http://peterodding.com/code/vim/lua-inspect/ and http://github.com/xolox/vim-lua-inspect.
186-
If you like this plug-in please vote for it on Vim Online [9].
195+
If you like this plug-in please vote for it on Vim Online [14].
187196

188197
===============================================================================
189198
*luainspect-license*
190199
License ~
191200

192-
This software is licensed under the MIT license [10]. Š 2013 Peter Odding
193-
<peter@peterodding.com>.
201+
This software is licensed under the MIT license [15]. Copyright 2013 Peter
202+
Odding <peter@peterodding.com>.
194203

195204
===============================================================================
196205
*luainspect-references*
@@ -202,9 +211,14 @@ References ~
202211
[4] http://www.scintilla.org/SciTE.html
203212
[5] http://peterodding.com/code/vim/luainspect/screenshot.png
204213
[6] http://peterodding.com/code/vim/downloads/lua-inspect.zip
205-
[7] http://peterodding.com/code/vim/shell/
206-
[8] http://en.wikipedia.org/wiki/Dynamic-link_library
207-
[9] http://www.vim.org/scripts/script.php?script_id=3169
208-
[10] http://en.wikipedia.org/wiki/MIT_License
214+
[7] http://peterodding.com/code/vim/downloads/misc.zip
215+
[8] http://www.vim.org/scripts/script.php?script_id=2332
216+
[9] https://github.com/gmarik/vundle
217+
[10] http://github.com/xolox/vim-lua-inspect
218+
[11] http://github.com/xolox/vim-misc
219+
[12] http://peterodding.com/code/vim/shell/
220+
[13] http://en.wikipedia.org/wiki/Dynamic-link_library
221+
[14] http://www.vim.org/scripts/script.php?script_id=3169
222+
[15] http://en.wikipedia.org/wiki/MIT_License
209223

210224
vim: ft=help

0 commit comments

Comments
 (0)