|
|
@ -22,6 +22,27 @@ vim.api.nvim_set_keymap('n', '<Leader>r', '<cmd>lua NumberToggle()<CR>', keymap_ |
|
|
|
-- the next search. |
|
|
|
-- the next search. |
|
|
|
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 |
|
|
|
|
|
|
|
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}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.keymap.set('i', '<C-Space>', '<Plug>(asyncomplete_force_refresh)', keymap_opts) |
|
|
|
|
|
|
|
|
|
|
|
-- 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', |
|
|
@ -29,4 +50,3 @@ vim.api.nvim_set_keymap( |
|
|
|
[[:let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>]], |
|
|
|
[[:let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>]], |
|
|
|
keymap_opts) |
|
|
|
keymap_opts) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|