Upload files to "lua"
This commit is contained in:
28
lua/keybinds.lua
Normal file
28
lua/keybinds.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
-- re center when moving up or down
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set('n', 'yy', 'Y', { noremap = true })
|
||||
|
||||
|
||||
-- for easier split navigation
|
||||
-- Keymaps for navigating windows
|
||||
vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'Go to left window' })
|
||||
vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'Go to lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k', { desc = 'Go to upper window' })
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l', { desc = 'Go to right window' })
|
||||
|
||||
-- keybinds for move.nvim
|
||||
local opts = { noremap = true, silent = true }
|
||||
-- Normal-mode commands
|
||||
vim.keymap.set('n', '<A-j>', ':MoveLine(1)<CR>', opts)
|
||||
vim.keymap.set('n', '<A-k>', ':MoveLine(-1)<CR>', opts)
|
||||
vim.keymap.set('n', '<A-h>', ':MoveHChar(-1)<CR>', opts)
|
||||
vim.keymap.set('n', '<A-l>', ':MoveHChar(1)<CR>', opts)
|
||||
vim.keymap.set('n', '<leader>wf', ':MoveWord(1)<CR>', opts)
|
||||
vim.keymap.set('n', '<leader>wb', ':MoveWord(-1)<CR>', opts)
|
||||
-- Visual-mode commands
|
||||
vim.keymap.set('v', '<A-j>', ':MoveBlock(1)<CR>', opts)
|
||||
vim.keymap.set('v', '<A-k>', ':MoveBlock(-1)<CR>', opts)
|
||||
vim.keymap.set('v', '<A-h>', ':MoveHBlock(-1)<CR>', opts)
|
||||
vim.keymap.set('v', '<A-l>', ':MoveHBlock(1)<CR>', opts)
|
||||
Reference in New Issue
Block a user