]> git.madduck.net Git - etc/neovim.git/blob - .config/nvim/keymaps.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

keybindings to navigate loclist
[etc/neovim.git] / .config / nvim / keymaps.lua
1 -- this isn't windows, screw the F1->help key
2 vim.keymap.set({ "n", "v", "o", "i" }, "<F1>", "<Esc>")
3
4 -- toggle paste mode with F2
5 vim.keymap.set({ "n", "v", "o", "i" }, "<F2>", "<cmd>set invpaste<CR>")
6
7 -- clear highlights on search when pressing <Esc> in normal mode
8 vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
9
10 -- loclist navigation
11 vim.keymap.set({'n', 'v', 'i'}, '<C-k>', '<cmd>lprev<CR>')
12 vim.keymap.set({'n', 'v', 'i'}, '<C-j>', '<cmd>lnext<CR>')
13
14 -- Pop-up menu navigation with tab
15 vim.keymap.set("i", "<Tab>", function()
16         return vim.fn.pumvisible() and "<C-n>" or "<Tab>"
17 end, { expr = true, remap = false })
18 vim.keymap.set("i", "<S-Tab>", function()
19         return vim.fn.pumvisible() and "<C-p>" or "<S-Tab>"
20 end, { expr = true, remap = false })