move.nvim with keymaps

This commit is contained in:
Imbus 2024-07-11 22:03:56 +02:00
parent 5e4b4f8d60
commit c7946a839e

View file

@ -190,6 +190,20 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Normal-mode commands
vim.keymap.set('n', '<A-j>', ':MoveLine(1)<CR>')
vim.keymap.set('n', '<A-k>', ':MoveLine(-1)<CR>')
vim.keymap.set('n', '<A-h>', ':MoveHChar(-1)<CR>')
vim.keymap.set('n', '<A-l>', ':MoveHChar(1)<CR>')
vim.keymap.set('n', '<leader>wf', ':MoveWord(1)<CR>')
vim.keymap.set('n', '<leader>wb', ':MoveWord(-1)<CR>')
-- Visual-mode commands
vim.keymap.set('v', '<A-j>', ':MoveBlock(1)<CR>')
vim.keymap.set('v', '<A-k>', ':MoveBlock(-1)<CR>')
vim.keymap.set('v', '<A-h>', ':MoveHBlock(-1)<CR>')
vim.keymap.set('v', '<A-l>', ':MoveHBlock(1)<CR>')
-- [[ Basic Autocommands ]] -- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands` -- See `:help lua-guide-autocommands`
@ -230,6 +244,10 @@ require('lazy').setup({
-- Remember position -- Remember position
{ 'vladdoster/remember.nvim', opts = {} }, { 'vladdoster/remember.nvim', opts = {} },
-- Move lines
{ 'fedepujol/move.nvim', opts = { noremap = true, silent = true } },
-- NOTE: Plugins can also be added by using a table, -- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following -- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc. -- keys can be used to configure plugin behavior/loading/etc.