From e7434e9d2f5f5a7695a35c09066d8c1cc2b29b58 Mon Sep 17 00:00:00 2001 From: Adam <56338480+adastx@users.noreply.github.com> Date: Wed, 6 Oct 2021 13:36:12 +0200 Subject: vim added bind for moving selected line(s) around --- .config/nvim/lua/binds.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/nvim/lua/binds.lua b/.config/nvim/lua/binds.lua index 5782f68..55225d4 100644 --- a/.config/nvim/lua/binds.lua +++ b/.config/nvim/lua/binds.lua @@ -25,3 +25,6 @@ map('n', 'xn', 'lua vim.lsp.diagnostic.goto_next()', opts) map('n', 'xN', 'lua vim.lsp.diagnostic.goto_prev()', opts) map('n', 'xx', 'Telescope lsp_code_actions', opts) map('n', 'xX', 'Telescope lsp_range_code_actions', opts) + +map('v', 'J', ":m '>+1gv=gv", { noremap = true }) +map('v', 'K', ":m '<-2gv=gv", { noremap = true }) -- cgit v1.2.3-70-g09d2