Open bigboysuper6 opened 1 year ago
path:lua/core/plugin/list.lua
--move-nvim 提供快速移动代码的插件 { 'fedepujol/move.nvim', lazy=false, init = function() require('core.mappings').move() end, }
path:lua/core/mappings.lua
--move.nvim mapping M.move = function() local opts = { noremap = true, silent = true } -- Normal-mode commands vim.keymap.set('n', '<A-Down>', ':MoveLine(1)<CR>', opts) vim.keymap.set('n', '<A-Up>', ':MoveLine(-1)<CR>', opts) vim.keymap.set('n', '<A-Left>', ':MoveHChar(-1)<CR>', opts) vim.keymap.set('n', '<A-Right>', ':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-Down>', ':MoveBlock(1)<CR>', opts) vim.keymap.set('v', '<A-Up>', ':MoveBlock(-1)<CR>', opts) vim.keymap.set('v', '<A-Left>', ':MoveHBlock(-1)<CR>', opts) vim.keymap.set('v', '<A-Right>', ':MoveHBlock(1)<CR>', opts) end
move.nvim
path:lua/core/plugin/list.lua
path:lua/core/mappings.lua
move.nvim