Initial commit
This commit is contained in:
27
nvim/lua/config/core/keymaps.lua
Normal file
27
nvim/lua/config/core/keymaps.lua
Normal file
@ -0,0 +1,27 @@
|
||||
local keymap = vim.keymap
|
||||
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- INSERT MODE
|
||||
|
||||
-- map `ctrl + backspace` to delete previous word in insert mode
|
||||
keymap.set('i', '<C-H>', '<C-W>', opts)
|
||||
|
||||
-- map `ctrl + delete` to delete next word in insert mode
|
||||
keymap.set('i', '<C-Del>', '<C-o>dw', opts)
|
||||
|
||||
|
||||
-- NORMAL MODE
|
||||
|
||||
-- navigate in visual linewraps
|
||||
keymap.set('n', 'k', 'gk', opts)
|
||||
keymap.set('n', 'j', 'gj', opts)
|
||||
keymap.set('n', '<UP>', 'gk', opts)
|
||||
keymap.set('n', '<DOWN>', 'gj', opts)
|
||||
|
||||
|
||||
-- COMMANDS
|
||||
|
||||
-- print current working directory
|
||||
vim.api.nvim_create_user_command('Cwd', function() print(vim.fn.getcwd()) end, {})
|
||||
Reference in New Issue
Block a user