Fix keybinding, disable system clipboard by default.
This commit is contained in:
parent
c379ab0f71
commit
0b29740138
@ -1,4 +1,4 @@
|
|||||||
vim.keymap.set("n", "c-h>", "<cmd>TmuxNavigateLeft<cr>", { desc = "Window Left" })
|
vim.keymap.set("n", "C-h>", "<cmd>TmuxNavigateLeft<cr>", { desc = "Window Left" })
|
||||||
vim.keymap.set("n", "c-j>", "<cmd>TmuxNavigateDown<cr>", { desc = "Window Down" })
|
vim.keymap.set("n", "C-j>", "<cmd>TmuxNavigateDown<cr>", { desc = "Window Down" })
|
||||||
vim.keymap.set("n", "c-k>", "<cmd>TmuxNavigateUp<cr>", { desc = "Window Up" })
|
vim.keymap.set("n", "C-k>", "<cmd>TmuxNavigateUp<cr>", { desc = "Window Up" })
|
||||||
vim.keymap.set("n", "c-l>", "<cmd>TmuxNavigateRight<cr>", { desc = "Window Right" })
|
vim.keymap.set("n", "C-l>", "<cmd>TmuxNavigateRight<cr>", { desc = "Window Right" })
|
||||||
|
@ -1,12 +1,42 @@
|
|||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
-- Leader
|
-- Leader
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ';'
|
vim.g.maplocalleader = ';'
|
||||||
|
|
||||||
-- Diagnostic keymaps
|
-- Diagnostic keymaps
|
||||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
map('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
map('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
||||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
map('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
map('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||||
|
|
||||||
-- Lsp format
|
-- Lsp format
|
||||||
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, { desc = "Format current buffer" })
|
map('n', '<leader>f', vim.lsp.buf.format, { desc = "Format current buffer" })
|
||||||
|
|
||||||
|
-- Move text easilly
|
||||||
|
map("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move selected text up" })
|
||||||
|
map("v", "K", ":m '<-2<CR>gv=gv", { desc = "Move selected text down" })
|
||||||
|
|
||||||
|
-- better find next and previous
|
||||||
|
map("n", "n", "nzzzv", { desc = "Keep cursor in middle with search" })
|
||||||
|
map("n", "N", "Nzzzv", { desc = "Keep cursor in middle with search" })
|
||||||
|
|
||||||
|
map("n", "J", "mzJ`z", { desc = "Move up next line with space in between" })
|
||||||
|
|
||||||
|
-- greatest remap ever
|
||||||
|
map("x", "<leader>p", [["_dP]], { desc = "Paste while keeping the registry" })
|
||||||
|
|
||||||
|
-- source current lua config file
|
||||||
|
map("n", "<leader><leader>", function()
|
||||||
|
vim.cmd("so")
|
||||||
|
end, { desc = "Source current source file" })
|
||||||
|
|
||||||
|
-- better indenting
|
||||||
|
map("v", "<", "<gv")
|
||||||
|
map("v", ">", ">gv")
|
||||||
|
|
||||||
|
-- next greatest remap ever : asbjornHaland ( stolen from the primeagen )
|
||||||
|
map({ "n", "v" }, "<leader>y", [["+y]], { desc = "" })
|
||||||
|
map("n", "<leader>Y", [["+Y]])
|
||||||
|
|
||||||
|
map({ "n", "v" }, "<leader>d", [["_d]])
|
||||||
|
@ -20,9 +20,6 @@ opt.smartindent = true
|
|||||||
-- Enable the mouse, just to have it
|
-- Enable the mouse, just to have it
|
||||||
opt.mouse = 'a'
|
opt.mouse = 'a'
|
||||||
|
|
||||||
-- Enable system clipboard
|
|
||||||
opt.clipboard = 'unnamedplus'
|
|
||||||
|
|
||||||
-- Enable break indent
|
-- Enable break indent
|
||||||
opt.breakindent = true
|
opt.breakindent = true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user