|
|
@ -30,24 +30,6 @@ vim.api.nvim_set_keymap('n', '<Leader>r', '<cmd>lua NumberToggle()<CR>', keymap_ |
|
|
|
vim.api.nvim_set_keymap('n', '<CR>', ':noh<CR><CR>', keymap_opts) |
|
|
|
vim.api.nvim_set_keymap('n', '<CR>', ':noh<CR><CR>', keymap_opts) |
|
|
|
|
|
|
|
|
|
|
|
-- Autocomplete bindings |
|
|
|
-- Autocomplete bindings |
|
|
|
vim.keymap.set('i', '<Tab>', function() |
|
|
|
|
|
|
|
if vim.fn.pumvisible() == 1 then return '<C-n>' end |
|
|
|
|
|
|
|
return '<Tab>' |
|
|
|
|
|
|
|
end, {expr = true}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.keymap.set('i', '<S-Tab>', function() |
|
|
|
|
|
|
|
if vim.fn.pumvisible() == 1 then return '<C-p>' end |
|
|
|
|
|
|
|
return '<S-Tab>' |
|
|
|
|
|
|
|
end, {expr = true}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.keymap.set('i', '<CR>', function() |
|
|
|
|
|
|
|
if vim.fn.pumvisible() == 1 then |
|
|
|
|
|
|
|
vim.cmd [[ asyncomplete#close_popup() . "\<CR>" ]] |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return '<CR>' |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end, {expr = true}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- This one maps F5 to delete all trailing whitespace |
|
|
|
-- This one maps F5 to delete all trailing whitespace |
|
|
|
vim.api.nvim_set_keymap( |
|
|
|
vim.api.nvim_set_keymap( |
|
|
|
'n', |
|
|
|
'n', |
|
|
|