summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/bindings.lua
blob: 3db5aa66ddc77ceac265d96c5dfae312d3539042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
vim.keymap.set('n', '<M-;>', ':call nerdcommenter#Comment(0,"toggle")<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<M-x>', ':', { noremap = true, silent = false })
vim.keymap.set('n', '<M-k>', ':bprevious<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<C-u>', '<C-u>zz', { noremap = true, silent = false })
vim.keymap.set('n', '<C-d>', '<C-d>zz', { noremap = true, silent = false })
vim.keymap.set('n', '<M-j>', ':bnext<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<C-h>', '<C-w>h', { noremap = true, silent = false })
vim.keymap.set('n', '<C-j>', '<C-w>j', { noremap = true, silent = false })
vim.keymap.set('n', '<C-k>', '<C-w>k', { noremap = true, silent = false })
vim.keymap.set('n', '<C-l>', '<C-w>l', { noremap = true, silent = false })
vim.keymap.set('n', '<C-o>', '<C-w>o', { noremap = true, silent = false })
vim.keymap.set('n', '<C-q>', '<C-w>q', { noremap = true, silent = false })
vim.keymap.set('n', '*', '*zz', { noremap = true, silent = false })
vim.keymap.set('i', '<C-j>', 'pumvisible() ? "<C-n>" : "<C-j>"', { expr = true })
vim.keymap.set('i', '<C-k>', 'pumvisible() ? "<C-p>" : "<C-k>"', { expr = true })
vim.keymap.set('i', '<cr>',  'pumvisible() ? asyncomplete#close_popup() : "\\<cr>"', { expr = true })
vim.g.floaterm_keymap_toggle = '<F1>'
vim.g.floaterm_keymap_prev =   '<F11>'
vim.g.floaterm_keymap_next =   '<F12>'
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
vim.keymap.set('x', '<leader>p', "\"_dP")
vim.keymap.set('n', 'Q', '<nop>')