Permalink
Browse files

Map K for help lookup (in normal mode)

  • Loading branch information...
1 parent 17e9003 commit e3e7ab4a7bf39564871561cfac1c72e282721f36 @blueyed blueyed committed Mar 3, 2014
Showing with 5 additions and 5 deletions.
  1. +1 −1 README.md
  2. +2 −2 doc/ft_lua.txt
  3. +2 −2 ftplugin/lua.vim
View
@@ -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
View
@@ -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
View
@@ -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>

0 comments on commit e3e7ab4

Please sign in to comment.