From 5d0ad120c55fa19504272f53cf338e2491b432db Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Sat, 18 Jun 2011 07:31:45 +0200 Subject: [PATCH] Delete old Vim help files (never even noticed them :-S) --- doc/lua.txt | 187 -------------------------------------- doc/luaft.txt | 195 ---------------------------------------- plugin/lua-ftplugin.vim | 2 +- 3 files changed, 1 insertion(+), 383 deletions(-) delete mode 100644 doc/lua.txt delete mode 100644 doc/luaft.txt diff --git a/doc/lua.txt b/doc/lua.txt deleted file mode 100644 index 369fde9..0000000 --- a/doc/lua.txt +++ /dev/null @@ -1,187 +0,0 @@ -*lua.txt* Lua file type plug-in for the Vim text editor - -The Lua [1] file type plug-in for Vim makes it easier to work with Lua source -code in Vim by providing the following features: - - - The |'includeexpr'| option is set so that the |gf| (go to file) mapping knows - how to resolve Lua module names using package.path [2] - - - The |'include'| option is set so that Vim follows dofile() [3], loadfile() [4] - and require() [5] calls when looking for identifiers in included files - (this works together with the |'includeexpr'| option) - - - An automatic command is installed that runs 'luac -p' when you save your Lua - scripts. If 'luac' reports any errors they are shown in the quick-fix list - and Vim jumps to the line of the first error. If 'luac -p' doesn't report - any errors a check for undefined global variables is performed by parsing - the output of 'luac -p -l' - - - '' on a Lua function or 'method' call will try to open the relevant - documentation in the Lua Reference for Vim [6] - - - The |'completefunc'| option is set to allow completion of Lua 5.1 keywords, - global variables and library members using Control-X Control-U - - - The |'omnifunc'| option is set to allow dynamic completion of the variables - defined in all modules installed on the system using Control-X Control-O, - however it needs to be explicitly enabled by setting the - |lua_complete_omni| option because this functionality may have undesired - side effects! When you invoke omni completion after typing 'require '' or - 'require('' you get completion of module names - - - Several |text-objects| are defined so you can jump between blocks and - functions - - - A pretty nifty hack of the matchit plug-in (see |matchit-install|) is - included: When the cursor is on a 'function' or 'return' keyword the '%' - mapping cycles between the relevant keywords ('function', 'return', 'end'), - this also works for branching statements ('if', 'elseif', 'else', 'end') - and looping statements ('for', 'while', 'repeat', 'until', 'end') - -=============================================================================== - *lua-installation* -Installation ~ - -Unzip the most recent ZIP archive [7] 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 script and try -any of the features documented above. - -=============================================================================== - *lua-options* -Options ~ - -The Lua file type plug-in handles options as follows: First it looks at buffer -local variables, then it looks at global variables and if neither exists a -default is chosen. This means you can change how the plug-in works for -individual buffers. For example to change the location of the Lua compiler -used to check the syntax: -> - " This sets the default value for all buffers. - :let g:lua_compiler_name = '/usr/local/bin/luac' - - " This is how you change the value for one buffer. - :let b:lua_compiler_name = '/usr/local/bin/lualint' - -------------------------------------------------------------------------------- -The *lua_path* option - -This option contains the value of 'package.path' as a string. You shouldn't -need to change this because the plug-in is aware of $LUA_PATH [2] and if that -isn't set the plug-in will run a Lua interpreter to get the value of -package.path [2]. - -------------------------------------------------------------------------------- -The *lua_check_syntax* option - -When you write a Lua script to disk the plug-in automatically runs the Lua -compiler to check for syntax errors. To disable this behavior you can set this -option to false (0): -> - let g:lua_check_syntax = 0 - -You can manually check the syntax using the ':CheckSyntax' command. - -------------------------------------------------------------------------------- -The *lua_check_globals* option - -When you write a Lua script to disk the plug-in automatically runs the Lua -compiler to check for undefined global variables. To disable this behavior you -can set this option to false (0): -> - let g:lua_check_globals = 0 - -You can manually check the globals using the ':CheckGlobals' command. - -------------------------------------------------------------------------------- -The *lua_compiler_name* option - -The name or path of the Lua compiler used to check for syntax errors. You can -set this option to run the Lua compiler from a non-standard location or to run -a dedicated syntax checker like lualint [8]. - -------------------------------------------------------------------------------- -The *lua_error_format* option - -If you use a dedicated syntax checker you may need to change this option to -reflect the format of the messages printed by the syntax checker. - -------------------------------------------------------------------------------- -The *lua_complete_keywords* option - -To disable completion of keywords you can set this option to false (0). - -------------------------------------------------------------------------------- -The *lua_complete_globals* option - -To disable completion of global functions you can set this option to false -(0). - -------------------------------------------------------------------------------- -The *lua_complete_library* option - -To disable completion of library functions you can set this option to false -(0). - -------------------------------------------------------------------------------- -The *lua_complete_dynamic* option - -When you type a dot after a word the Lua file type plug-in will automatically -start completion. To disable this behavior you can set this option to false -(0). - -------------------------------------------------------------------------------- -The *lua_complete_omni* option - -This option is disabled by default for two reasons: - - - The omni completion support works by enumerating and loading all installed - modules. If module loading has side effects this can have unintended - consequences! - - - Because all modules installed on the system are loaded, collecting the - completion candidates can be slow. After the first run the completion - candidates are cached so this will only bother you once (until you restart - Vim). - -If you want to use the omni completion despite the warnings above, execute the -following command: -> - :let g:lua_complete_omni = 1 - -Now when you type Control-X Control-O Vim will hang for a moment, after which -you should be presented with an enormous list of completion candidates :-) - -=============================================================================== - *lua-contact* -Contact ~ - -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-ftplugin and http://github.com/xolox/vim-lua-ftplugin. -If you like this plug-in please vote for it on Vim Online [9]. - -=============================================================================== - *lua-license* -License ~ - -This software is licensed under the MIT license [10]. Copyright 2011 Peter -Odding . - -=============================================================================== - *lua-references* -References ~ - -[1] http://www.lua.org/ -[2] http://www.lua.org/manual/5.1/manual.html#pdf-package.path -[3] http://www.lua.org/manual/5.1/manual.html#pdf-dofile -[4] http://www.lua.org/manual/5.1/manual.html#pdf-loadfile -[5] http://www.lua.org/manual/5.1/manual.html#pdf-require -[6] http://www.vim.org/scripts/script.php?script_id=1291 -[7] http://peterodding.com/code/vim/downloads/lua-ftplugin.zip -[8] http://lua-users.org/wiki/LuaLint -[9] http://www.vim.org/scripts/script.php?script_id=3625 -[10] http://en.wikipedia.org/wiki/MIT_License - -vim: ft=help diff --git a/doc/luaft.txt b/doc/luaft.txt deleted file mode 100644 index 6472dd9..0000000 --- a/doc/luaft.txt +++ /dev/null @@ -1,195 +0,0 @@ -*luaft.txt* Lua file type plug-in for the Vim text editor - -The Lua [1] file type plug-in for Vim makes it easier to work with Lua source -code in Vim by providing the following features: - - - The |'includeexpr'| option is set so that the |gf| (go to file) mapping knows - how to resolve Lua module names using package.path [2] - - - The |'include'| option is set so that Vim follows dofile() [3], loadfile() [4] - and require() [5] calls when looking for identifiers in included files - (this works together with the |'includeexpr'| option) - - - An automatic command is installed that runs 'luac -p' when you save your Lua - scripts. If 'luac' reports any errors they are shown in the quick-fix list - and Vim jumps to the line of the first error. If 'luac -p' doesn't report - any errors a check for undefined global variables is performed by parsing - the output of 'luac -p -l' - - - '' on a Lua function or 'method' call will try to open the relevant - documentation in the Lua Reference for Vim [6] - - - The |'completefunc'| option is set to allow completion of Lua 5.1 keywords, - global variables and library members using Control-X Control-U - - - The |'omnifunc'| option is set to allow dynamic completion of the variables - defined in all modules installed on the system using Control-X Control-O, - however it needs to be explicitly enabled by setting the - |lua_complete_omni| option because this functionality may have undesired - side effects! When you invoke omni completion after typing 'require '' or - 'require('' you get completion of module names - - Screenshot of omni completion, see reference [7] - - - Several |text-objects| are defined so you can jump between blocks and - functions - - - A pretty nifty hack of the matchit plug-in (see |matchit-install|) is - included: When the cursor is on a 'function' or 'return' keyword the '%' - mapping cycles between the relevant keywords ('function', 'return', 'end'), - this also works for branching statements ('if', 'elseif', 'else', 'end') - and looping statements ('for', 'while', 'repeat', 'until', 'end') - -=============================================================================== - *luaft-installation* -Installation ~ - -Unzip the most recent ZIP archive [8] 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 script and try -any of the features documented above. - -=============================================================================== - *luaft-options* -Options ~ - -The Lua file type plug-in handles options as follows: First it looks at buffer -local variables, then it looks at global variables and if neither exists a -default is chosen. This means you can change how the plug-in works for -individual buffers. For example to change the location of the Lua compiler -used to check the syntax: -> - " This sets the default value for all buffers. - :let g:lua_compiler_name = '/usr/local/bin/luac' - - " This is how you change the value for one buffer. - :let b:lua_compiler_name = '/usr/local/bin/lualint' - -------------------------------------------------------------------------------- -The *lua_path* option - -This option contains the value of 'package.path' as a string. You shouldn't -need to change this because the plug-in is aware of $LUA_PATH [2] and if that -isn't set the plug-in will run a Lua interpreter to get the value of -package.path [2]. - -------------------------------------------------------------------------------- -The *lua_check_syntax* option - -When you write a Lua script to disk the plug-in automatically runs the Lua -compiler to check for syntax errors. To disable this behavior you can set this -option to false (0): -> - let g:lua_check_syntax = 0 - -You can manually check the syntax using the ':CheckSyntax' command. - -------------------------------------------------------------------------------- -The *lua_check_globals* option - -When you write a Lua script to disk the plug-in automatically runs the Lua -compiler to check for undefined global variables. To disable this behavior you -can set this option to false (0): -> - let g:lua_check_globals = 0 - -You can manually check the globals using the ':CheckGlobals' command. - -------------------------------------------------------------------------------- -The *lua_compiler_name* option - -The name or path of the Lua compiler used to check for syntax errors (defaults -to 'luac'). You can set this option to run the Lua compiler from a -non-standard location or to run a dedicated syntax checker like lualint [9]. - -------------------------------------------------------------------------------- -The *lua_compiler_args* option - -The argument(s) required by the compiler or syntax checker (defaults to '-p'). - -------------------------------------------------------------------------------- -The *lua_error_format* option - -If you use a dedicated syntax checker you may need to change this option to -reflect the format of the messages printed by the syntax checker. - -------------------------------------------------------------------------------- -The *lua_complete_keywords* option - -To disable completion of keywords you can set this option to false (0). - -------------------------------------------------------------------------------- -The *lua_complete_globals* option - -To disable completion of global functions you can set this option to false -(0). - -------------------------------------------------------------------------------- -The *lua_complete_library* option - -To disable completion of library functions you can set this option to false -(0). - -------------------------------------------------------------------------------- -The *lua_complete_dynamic* option - -When you type a dot after a word the Lua file type plug-in will automatically -start completion. To disable this behavior you can set this option to false -(0). - -------------------------------------------------------------------------------- -The *lua_complete_omni* option - -This option is disabled by default for two reasons: - - - The omni completion support works by enumerating and loading all installed - modules. If module loading has side effects this can have unintended - consequences! - - - Because all modules installed on the system are loaded, collecting the - completion candidates can be slow. After the first run the completion - candidates are cached so this will only bother you once (until you restart - Vim). - -If you want to use the omni completion despite the warnings above, execute the -following command: -> - :let g:lua_complete_omni = 1 - -Now when you type Control-X Control-O Vim will hang for a moment, after which -you should be presented with an enormous list of completion candidates :-) - -=============================================================================== - *luaft-contact* -Contact ~ - -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-ftplugin and http://github.com/xolox/vim-lua-ftplugin. -If you like this plug-in please vote for it on Vim Online [10]. - -=============================================================================== - *luaft-license* -License ~ - -This software is licensed under the MIT license [11]. Copyright 2011 Peter -Odding . - -=============================================================================== - *luaft-references* -References ~ - -[1] http://www.lua.org/ -[2] http://www.lua.org/manual/5.1/manual.html#pdf-package.path -[3] http://www.lua.org/manual/5.1/manual.html#pdf-dofile -[4] http://www.lua.org/manual/5.1/manual.html#pdf-loadfile -[5] http://www.lua.org/manual/5.1/manual.html#pdf-require -[6] http://www.vim.org/scripts/script.php?script_id=1291 -[7] http://peterodding.com/code/vim/lua-ftplugin/screenshots/omni-completion.png -[8] http://peterodding.com/code/vim/downloads/lua-ftplugin.zip -[9] http://lua-users.org/wiki/LuaLint -[10] http://www.vim.org/scripts/script.php?script_id=3625 -[11] http://en.wikipedia.org/wiki/MIT_License - -vim: ft=help diff --git a/plugin/lua-ftplugin.vim b/plugin/lua-ftplugin.vim index 678c688..fafe971 100644 --- a/plugin/lua-ftplugin.vim +++ b/plugin/lua-ftplugin.vim @@ -12,7 +12,7 @@ if &cp || exists('g:loaded_lua_ftplugin') finish endif -let g:lua_ftplugin_version = '0.6.15' +let g:lua_ftplugin_version = '0.6.16' " Commands to manually check for syntax errors and undefined globals. command! -bar LuaCheckSyntax call xolox#lua#checksyntax()