Skip to content

Commit

Permalink
fix: add missign vim keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
shmileee committed Jul 19, 2024
1 parent df010f1 commit 9e473fb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/private_dot_config/private_lvim/config.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- general
vim.opt.spell = true
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")

lvim.log.level = "warn"
lvim.format_on_save = true
lvim.colorscheme = "onedarker"
Expand All @@ -13,6 +17,11 @@ lvim.keys.normal_mode["o"] = "o<Esc>"
lvim.keys.normal_mode["O"] = "O<Esc>"
lvim.keys.normal_mode["<S-h>"] = "<cmd>bnext<CR>"
lvim.keys.normal_mode["<S-l>"] = "<cmd>bprev<CR>"
lvim.keys.normal_mode["k"] = "gk"
lvim.keys.normal_mode["j"] = "gj"
lvim.keys.visual_mode["p"] = "pgvy"
lvim.keys.normal_mode["Y"] = "y$"
lvim.keys.visual_mode["y"] = "ygv<esc>"

-- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode.
-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet.
Expand All @@ -38,6 +47,9 @@ lvim.builtin.which_key.mappings["st"] = {
"Search text in current directory"
}

lvim.builtin.which_key.mappings["n"] = { "<cmd>normal! mz[s1z=`z<CR>", "Fix spelling" }
lvim.builtin.which_key.mappings["r"] = { ":%s///g<Left><Left>", "Replace" }

lvim.builtin.alpha.active = true
lvim.builtin.alpha.mode = "dashboard"
lvim.builtin.terminal.active = true
Expand Down

0 comments on commit 9e473fb

Please sign in to comment.