From a45f1d47ecb93a311a144f9101c091272bcbf804 Mon Sep 17 00:00:00 2001 From: pro100ton Date: Fri, 31 Jan 2025 22:33:00 +0300 Subject: [PATCH] Remap leader key for , --- init.lua | 9 +++++---- main.py | 1 + plugin/keymaps.lua | 4 ++++ plugin/options.lua | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 main.py diff --git a/init.lua b/init.lua index a7a4306..8b6bc7e 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,8 @@ +-- Making leader () key to space +vim.g.mapleader = "," +-- Making local leader () key to backslash +vim.g.maplocalleader = "\\" + -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then @@ -15,10 +20,6 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- Making leader () key to space -vim.g.mapleader = " " --- Making local leader () key to backslash -vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ diff --git a/main.py b/main.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/main.py @@ -0,0 +1 @@ + diff --git a/plugin/keymaps.lua b/plugin/keymaps.lua index b6ad43a..5af4f86 100644 --- a/plugin/keymaps.lua +++ b/plugin/keymaps.lua @@ -5,3 +5,7 @@ set("n", "", "") set("n", "", "") set("n", "", "") set("n", "", "") + +-- Bindings for reloading LUA files (used when working with lua files) +set("n", "x", ".lua", { desc = "Execute the current lne" }) +set("n", "x", "source %", { desc = "Execute the current file" }) diff --git a/plugin/options.lua b/plugin/options.lua index 36a9696..01e1430 100644 --- a/plugin/options.lua +++ b/plugin/options.lua @@ -1,7 +1,7 @@ local opt = vim.opt -- Command to show inline what are you trying to perform -opt.inccommand = "split" +inccommand = "split" -- Search settings to toggle "smart case" search only if 1+ uppercase char -- persist in search line