chore(nvim): Fully migrated mappings)

This commit is contained in:
Ahmad Ansori Palembani 2024-04-18 12:24:30 +07:00
parent 4313d77fe7
commit 05ab2b0a51
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -18,4 +18,22 @@ map("v", "<C-/>", "gc", { remap = true })
map("i", "<C-/>", "<esc>gcc", { remap = true })
-- Normal command shortcut for VISUAL mode
map("v", ".", ":normal .<CR>")
map("v", ".", ":normal .<cr>")
-- Clear search
map("n", "<leader>c", "<cmd>noh<cr>")
-- Navigate splits
map("n", "<C-h>", "<C-w>h")
map("n", "<C-j>", "<C-w>j")
map("n", "<C-k>", "<C-w>k")
map("n", "<C-l>", "<C-w>l")
-- Ctrl+P or Ctrl+N alternatives
-- map("i", "<expr><Up>", vim.fn.pumvisible() == 1 and "<C-n>" or "<Up>")
-- map("i", "<expr><Down>", vim.fn.pumvisible() == 1 and "<C-p>" or "<Down>")
-- map("i", "<expr><Tab>", vim.fn.pumvisible() == 1 and "<C-n>" or "<Tab>")
-- map("i", "<expr><S-Tab>", vim.fn.pumvisible() == 1 and "<C-p>" or "<S-Tab>")
-- Enter to complete
-- map("i", "<expr><cr>", vim.fn.pumvisible() == 1 and "<C-y>" or "<cr>")