Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | docs(lua): opts in `vim.keymap.{set,del}` can be optional (#20255) | Lewis Russell | 2022-09-20 |
| | |||
* | docs(lua): clarify vim.keymap.set() opts (#19761) | Antoine Cotten | 2022-08-14 |
| | |||
* | docs: fix typos (#19588) | dundargoc | 2022-08-03 |
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: notomo <notomo.motono@gmail.com> | ||
* | test: improve mapping tests and docs (#19619) | zeertzjq | 2022-08-02 |
| | |||
* | feat(api): add replace_keycodes to nvim_set_keymap (#19598) | ii14 | 2022-08-01 |
| | |||
* | chore: format runtime with stylua | Christian Clason | 2022-05-09 |
| | |||
* | fix(lua): don't mutate opts parameter of vim.keymap.del (#18227) | Andrey Mishchenko | 2022-04-23 |
| | | | | | | `vim.keymap.del` takes an `opts` parameter that lets caller refer to and delete buffer-local mappings. For some reason the implementation of `vim.keymap.del` mutates the table that is passed in, setting `opts.buffer` to `nil`. This is wrong and also undocumented. | ||
* | docs: vim.keymap.set can specify buffer as an option | atusy | 2022-04-21 |
| | |||
* | fix(keymap): don't coerce false to '' | Lewis Russell | 2022-04-01 |
| | |||
* | feat(keymap): return nil from an expr keymap | Lewis Russell | 2022-03-24 |
| | | | | | For Lua callback expr keymaps, returning `nil` or `false` is equivalent to an empty string | ||
* | chore: fix typos (#17670) | dundargoc | 2022-03-17 |
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> | ||
* | chore: fix typos (#17331) | dundargoc | 2022-03-10 |
| | | | | | | Co-authored-by: Hongyi Lyu <hongyi.lyu95@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: notomo <notomo.motono@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> | ||
* | chore: remove <Plug> detection from vim.keymap | shadmansaleh | 2022-02-27 |
| | |||
* | feat(lua): add vim.keymap | shadmansaleh | 2022-01-04 |
This introduces two new functions `vim.keymap.set` & `vim.keymap.del` differences compared to regular set_keymap: - remap is used as opposite of noremap. By default it's true for <Plug> keymaps and false for others. - rhs can be lua function. - mode can be a list of modes. - replace_keycodes option for lua function expr maps. (Default: true) - handles buffer specific keymaps Examples: ```lua vim.keymap.set('n', 'asdf', function() print("real lua function") end) vim.keymap.set({'n', 'v'}, '<leader>lr', vim.lsp.buf.references, {buffer=true}) vim.keymap.set('n', '<leader>w', "<cmd>w<cr>", {silent = true, buffer = 5 }) vim.keymap.set('i', '<Tab>', function() return vim.fn.pumvisible() == 1 and "<C-n>" or "<Tab>" end, {expr = true}) vim.keymap.set('n', '[%', '<Plug>(MatchitNormalMultiBackward)') vim.keymap.del('n', 'asdf') vim.keymap.del({'n', 'i', 'v'}, '<leader>w', {buffer = 5 }) ``` |