move.nvim with keymaps
This commit is contained in:
parent
5e4b4f8d60
commit
c7946a839e
1 changed files with 18 additions and 0 deletions
18
init.lua
18
init.lua
|
@ -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-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 ]]
|
||||
-- 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.
|
||||
|
|
Loading…
Reference in a new issue