move selected text

This commit is contained in:
Zacharias-Brohn
2025-01-22 14:45:27 +01:00
parent 63ba472698
commit 22de8b4674
+4 -7
View File
@@ -1,20 +1,19 @@
require "nvchad.mappings" require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" }) map("n", ";", ":", { desc = "CMD enter command mode" })
-- Move selected text up
map("v", "<C-Up>", ":m '<-2<CR>gv=gv", { desc = "Move selected text up" })
map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" })
-- Alt + Arrow Key to change buffer -- Alt + Arrow Key to change buffer
map("n", "<A-Left>", "<C-w>h", { desc = "Move to left split" }) map("n", "<A-Left>", "<C-w>h", { desc = "Move to left split" })
map("n", "<A-Down>", "<C-w>j", { desc = "Move to bottom split" }) map("n", "<A-Down>", "<C-w>j", { desc = "Move to bottom split" })
map("n", "<A-Up>", "<C-w>k", { desc = "Move to top split" }) map("n", "<A-Up>", "<C-w>k", { desc = "Move to top split" })
map("n", "<A-Right>", "<C-w>l", { desc = "Move to right split" }) map("n", "<A-Right>", "<C-w>l", { desc = "Move to right split" })
-- Copilot suggestion
-- map("i", "jk", vim.cmd("Copilot suggestion accept_word"), { expr = true })
-- Copilot Chat buffer -- Copilot Chat buffer
map("n", "<A-c>", vim.cmd.CopilotChatToggle) map("n", "<A-c>", vim.cmd.CopilotChatToggle)
map("i", "<A-c>", vim.cmd.CopilotChatToggle) map("i", "<A-c>", vim.cmd.CopilotChatToggle)
@@ -25,5 +24,3 @@ map('n', '<leader>u', vim.cmd.UndotreeToggle)
map("n", "<A-->", "<cmd>BufDel<cr>") map("n", "<A-->", "<cmd>BufDel<cr>")
map("n", "<C-a>", "ggVG", { noremap = true, silent = true }) map("n", "<C-a>", "ggVG", { noremap = true, silent = true })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")