27 lines
694 B
Lua
27 lines
694 B
Lua
local keymap = vim.api.nvim_set_keymap
|
|
local opts = { noremap = true, silent = true }
|
|
|
|
|
|
-- undo and rendo file content
|
|
keymap("n", "<C-z>", ":undo<CR>", opts)
|
|
keymap("n", "<C-r>", ":redo<CR>", opts)
|
|
|
|
-- save file
|
|
keymap("n", "<C-s>", ":w<CR>", opts)
|
|
|
|
-- open file manager
|
|
keymap("n", "<C-o>", ":Files<CR>", opts)
|
|
|
|
-- close tab
|
|
keymap('n', '<C-d>', ':BufferClose<CR>', opts)
|
|
|
|
-- move between tabs
|
|
keymap('n', '<C-j>', ':BufferPrevious<CR>', opts)
|
|
keymap('n', '<C-k>', ':BufferNext<CR>', opts)
|
|
|
|
-- open cmd to create new file
|
|
keymap('n', '<C-l>', ':e ', opts)
|
|
|
|
-- install plugins
|
|
keymap('n', '<C-u>', ':PackerInstall<CR>', opts) -- packer
|
|
keymap('n', '<C-i>', ':PlugInstall<CR>', opts) -- plug
|