summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <56338480+adastx@users.noreply.github.com>2021-10-06 13:36:12 +0200
committerAdam <56338480+adastx@users.noreply.github.com>2021-10-06 13:36:12 +0200
commite7434e9d2f5f5a7695a35c09066d8c1cc2b29b58 (patch)
treeb3da596f15cff82ecf09e99290a8774b69810ec3
parent7b4de0b36088ca40d9b53c722e97432f3a9b461a (diff)
vim added bind for moving selected line(s) around
-rw-r--r--.config/nvim/lua/binds.lua3
1 files changed, 3 insertions, 0 deletions
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', '<leader>xn', '<cmd>lua vim.lsp.diagnostic.goto_next()<cr>', opts)
map('n', '<leader>xN', '<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>', opts)
map('n', '<leader>xx', '<cmd>Telescope lsp_code_actions<cr>', opts)
map('n', '<leader>xX', '<cmd>Telescope lsp_range_code_actions<cr>', opts)
+
+map('v', 'J', ":m '>+1<CR>gv=gv", { noremap = true })
+map('v', 'K', ":m '<-2<CR>gv=gv", { noremap = true })