update mappings
This commit is contained in:
parent
28630f258b
commit
d0245d52cf
3 changed files with 25 additions and 6 deletions
|
|
@ -1,9 +1,21 @@
|
||||||
return {
|
return {
|
||||||
n = {
|
n = {
|
||||||
|
--Usefull vanilla remaps
|
||||||
|
|
||||||
|
["J"] = { "mzJ`z", desc = "Keep cursor in column while joining lines" },
|
||||||
|
|
||||||
|
--
|
||||||
|
["<C-d>"] = { "<C-d>zz", desc = "Keep cursor centered while junping" },
|
||||||
|
["<C-u>"] = { "<C-u>zz", desc = "Keep cursor centered while junping" },
|
||||||
|
|
||||||
|
-- Keep cursor centered while searching
|
||||||
|
["n"] = { "nzzzv", desc = "Keep cursor centered while searching" },
|
||||||
|
["N"] = { "Nzzzv", desc = "Keep cursor centered while searching" },
|
||||||
|
|
||||||
|
["q"] = "<nop>",
|
||||||
|
|
||||||
-- Buffers
|
-- Buffers
|
||||||
["H"] = {
|
["H"] = {
|
||||||
|
|
||||||
function()
|
function()
|
||||||
require("astronvim.utils.buffer").nav( -(vim.v.count > 0 and vim.v.count or 1))
|
require("astronvim.utils.buffer").nav( -(vim.v.count > 0 and vim.v.count or 1))
|
||||||
end,
|
end,
|
||||||
|
|
@ -126,8 +138,8 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
["<leader>r"] = {
|
["<leader>r"] = {
|
||||||
":s/",
|
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
|
||||||
desc = "Search and replace",
|
desc = "Search and replace current word",
|
||||||
},
|
},
|
||||||
["<leader>R"] = {
|
["<leader>R"] = {
|
||||||
":%s/",
|
":%s/",
|
||||||
|
|
@ -141,9 +153,13 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
["p"] = {
|
["p"] = {
|
||||||
"pgvy",
|
[["_dP]],
|
||||||
desc = "Paste and re yank text",
|
desc = "Paste whitout lossing yanked text",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- move selection up and down
|
||||||
|
["J"] = ":m '>+1<CR>gv=gv",
|
||||||
|
["K"] = ":m '<-2<CR>gv=gv",
|
||||||
},
|
},
|
||||||
t = {
|
t = {
|
||||||
["<C-t>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" },
|
["<C-t>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" },
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ return {
|
||||||
"pyright",
|
"pyright",
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"sqlls",
|
"sqlls",
|
||||||
"sumneko_lua",
|
"lua_ls",
|
||||||
"tsserver",
|
"tsserver",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ return {
|
||||||
"chrisgrieser/nvim-spider",
|
"chrisgrieser/nvim-spider",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
|
require("spider").setup({
|
||||||
|
skipInsignificantPunctuation = false,
|
||||||
|
})
|
||||||
vim.keymap.set({ "n", "o", "x" }, "w", "<cmd>lua require('spider').motion('w')<CR>", { desc = "Spider-w" })
|
vim.keymap.set({ "n", "o", "x" }, "w", "<cmd>lua require('spider').motion('w')<CR>", { desc = "Spider-w" })
|
||||||
vim.keymap.set({ "n", "o", "x" }, "e", "<cmd>lua require('spider').motion('e')<CR>", { desc = "Spider-e" })
|
vim.keymap.set({ "n", "o", "x" }, "e", "<cmd>lua require('spider').motion('e')<CR>", { desc = "Spider-e" })
|
||||||
vim.keymap.set({ "n", "o", "x" }, "b", "<cmd>lua require('spider').motion('b')<CR>", { desc = "Spider-b" })
|
vim.keymap.set({ "n", "o", "x" }, "b", "<cmd>lua require('spider').motion('b')<CR>", { desc = "Spider-b" })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue