Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Map K for help lookup (in normal mode)
  • Loading branch information
blueyed committed Mar 3, 2014
1 parent 17e9003 commit e3e7ab4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -8,7 +8,7 @@ The [Lua][lua] file type plug-in for [Vim][vim] makes it easier to work with Lua

* 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`

* `<F1>` on a Lua function or 'method' call will try to open the relevant documentation in the [Lua Reference for Vim][lrv]
* `K` (normal mode) and `<F1>` (insert mode) on a Lua function or 'method' call will try to open the relevant documentation in the [Lua Reference for Vim][lrv]

* The ['completefunc'][cfu] option is set to allow completion of Lua 5.1 keywords, global variables and library members using Control-X Control-U

Expand Down
4 changes: 2 additions & 2 deletions doc/ft_lua.txt
Expand Up @@ -44,8 +44,8 @@ code in Vim by providing the following features:
report any errors a check for undefined global variables is performed by
parsing the output of 'luac -p -l'

- '<F1>' on a Lua function or 'method' call will try to open the relevant
documentation in the Lua Reference for Vim [6]
- 'K' (normal mode) and 'F1' (insert mode) 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
Expand Down
4 changes: 2 additions & 2 deletions ftplugin/lua.vim
Expand Up @@ -51,9 +51,9 @@ call add(s:undo_ftplugin, 'delcommand CheckGlobals')

" Define mappings for context-sensitive help using Lua Reference for Vim. {{{1
imap <buffer> <F1> <C-o>:call xolox#lua#help()<Cr>
nmap <buffer> <F1> :call xolox#lua#help()<Cr>
nmap <buffer> K :call xolox#lua#help()<Cr>
call add(s:undo_ftplugin, 'iunmap <buffer> <F1>')
call add(s:undo_ftplugin, 'nunmap <buffer> <F1>')
call add(s:undo_ftplugin, 'nunmap <buffer> K')

" Define custom text objects to navigate Lua source code. {{{1
noremap <buffer> <silent> [{ m':call xolox#lua#jumpblock(0)<Cr>
Expand Down

0 comments on commit e3e7ab4

Please sign in to comment.