mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
docs: api, pack, events, develop
This commit is contained in:
@@ -21,12 +21,12 @@ local keymap = {}
|
||||
---
|
||||
--- ```lua
|
||||
--- -- Map "x" to a Lua function:
|
||||
--- vim.keymap.set('n', 'x', function() print("real lua function") end)
|
||||
--- vim.keymap.set('n', 'x', function() print('real lua function') end)
|
||||
--- -- Map "<leader>x" to multiple modes for the current buffer:
|
||||
--- vim.keymap.set({'n', 'v'}, '<leader>x', vim.lsp.buf.references, { buffer = true })
|
||||
--- -- Map <Tab> to an expression (|:map-<expr>|):
|
||||
--- vim.keymap.set('i', '<Tab>', function()
|
||||
--- return vim.fn.pumvisible() == 1 and "<C-n>" or "<Tab>"
|
||||
--- return vim.fn.pumvisible() == 1 and '<C-n>' or '<Tab>'
|
||||
--- end, { expr = true })
|
||||
--- -- Map "[%%" to a <Plug> mapping:
|
||||
--- vim.keymap.set('n', '[%%', '<Plug>(MatchitNormalMultiBackward)')
|
||||
|
||||
Reference in New Issue
Block a user