2024-02-04 20:53:56 -05:00
|
|
|
vim.g.mapleader = " "
|
|
|
|
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
|
|
|
|
|
|
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
|
|
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
|
|
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
|
|
|
vim.keymap.set("n", "n", "nzzzv")
|
|
|
|
vim.keymap.set("n", "N", "Nzzzv")
|
|
|
|
|
|
|
|
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
|
|
|
|
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>sg", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) --Global Search And Replace
|
|
|
|
vim.keymap.set("n", "<leader>ss", [[:.,$s/\<<C-r><C-w>\>/<C-r><C-w>/gIc<Left><Left><Left><Left>]]) --Search and replace incremental
|
|
|
|
vim.keymap.set("n", "<C-f>", [[/\<<C-r><C-w>\>/<CR>]]) -- ctrl find
|
|
|
|
|
2024-02-23 23:35:05 -05:00
|
|
|
local opts = { noremap = true, silent = true }
|
|
|
|
local ls = require("luasnip")
|
|
|
|
vim.api.nvim_set_keymap("n", "<Leader>nf", ":lua require('neogen').generate()<CR>", opts)
|
|
|
|
vim.keymap.set({"i", "s"}, "<C-L>", function() ls.jump( 1) end, {silent = true})
|
|
|
|
vim.keymap.set({"i", "s"}, "<C-J>", function() ls.jump(-1) end, {silent = true})
|