地址:http://lua-users.org/wiki/LuaPowerPatches
Advanced readline support (5.2, 5.1, 5.0)
This patch adds the following features to the existing readline support in Lua 5.x:
- Completion of keywords and global variable names.
- Recursive and metatable-aware completion of variable names.
- Context sensitive delimiter completion.
- Save/restore the history to/from a file (
LUA_HISTORYenv variable). - Set a limit for the size of the history (
LUA_HISTSIZEenv variable). - Set the app name to allow for
$if lua ... $endifin~/.inputrc.
After applying the patch start Lua and try these (replace ~ with the TAB key):
-
~~ fu~foo() ret~fa~end<CR> io~~~s~~~o~~~w~"foo\n")<CR>
本文介绍了一个Lua5.x的高级读取支持补丁,该补丁增加了关键字和全局变量名称的完成、递归和元表意识的变量名称完成、上下文敏感的分隔符完成等功能。此外,还提供了如何保存和从文件中恢复历史记录、设置历史大小限制、允许使用特定应用程序名称等详细说明。
2908

被折叠的 条评论
为什么被折叠?



