From c7946a839e5a6cf2f3f01900d8db39b3f108db82 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Thu, 11 Jul 2024 22:03:56 +0200 Subject: [PATCH] move.nvim with keymaps --- init.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/init.lua b/init.lua index 45cc321..19978f2 100644 --- a/init.lua +++ b/init.lua @@ -190,6 +190,20 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- Normal-mode commands +vim.keymap.set('n', '', ':MoveLine(1)') +vim.keymap.set('n', '', ':MoveLine(-1)') +vim.keymap.set('n', '', ':MoveHChar(-1)') +vim.keymap.set('n', '', ':MoveHChar(1)') +vim.keymap.set('n', 'wf', ':MoveWord(1)') +vim.keymap.set('n', 'wb', ':MoveWord(-1)') + +-- Visual-mode commands +vim.keymap.set('v', '', ':MoveBlock(1)') +vim.keymap.set('v', '', ':MoveBlock(-1)') +vim.keymap.set('v', '', ':MoveHBlock(-1)') +vim.keymap.set('v', '', ':MoveHBlock(1)') + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -230,6 +244,10 @@ require('lazy').setup({ -- Remember position { 'vladdoster/remember.nvim', opts = {} }, + + -- Move lines + { 'fedepujol/move.nvim', opts = { noremap = true, silent = true } }, + -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following -- keys can be used to configure plugin behavior/loading/etc.