[nvim] feat: comments and formatting
This commit is contained in:
parent
5e892c4f2c
commit
312d469f22
@ -11,7 +11,7 @@ vim.keymap.set({ "n", "v" }, "<space>",
|
|||||||
})
|
})
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
-- Dealing with word wrap
|
-- dealing with word wrap
|
||||||
vim.keymap.set("n", "k",
|
vim.keymap.set("n", "k",
|
||||||
"v:count == 0 ? 'gk' : 'k'",
|
"v:count == 0 ? 'gk' : 'k'",
|
||||||
{
|
{
|
||||||
@ -27,26 +27,30 @@ vim.keymap.set("n", "j",
|
|||||||
desc = "Smart down motion"
|
desc = "Smart down motion"
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>y",
|
-- yank and pasting
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>y",
|
||||||
"\"+y",
|
"\"+y",
|
||||||
{ desc = "Yank to clipboard"}
|
{ desc = "Yank to clipboard"}
|
||||||
)
|
)
|
||||||
vim.keymap.set("n", "<leader>p",
|
vim.keymap.set("n", "<leader>p",
|
||||||
"\"+P",
|
"\"+P",
|
||||||
{ desc = "Copy from clipboard"}
|
{ desc = "Paste from clipboard" }
|
||||||
)
|
)
|
||||||
vim.keymap.set("x", "<leader>p",
|
vim.keymap.set("x", "<leader>p",
|
||||||
"\"_dP",
|
"\"_dP",
|
||||||
{ desc = "Send selection to void register and paste from clipboard" }
|
{ desc = "Send selection to void register and paste from clipboard" }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
-- comfort zone
|
||||||
vim.keymap.set("n", "<leader><enter>",
|
vim.keymap.set("n", "<leader><enter>",
|
||||||
"<cmd>w! | !compiler %<CR>",
|
"<cmd>w! | !compiler %<CR>",
|
||||||
{ desc = "Compile current file using ~/.local/bin/compiler"}
|
{ desc = "Compile current file using ~/.local/bin/compiler" }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
-- packer
|
||||||
vim.keymap.set("n", "<leader>u",
|
vim.keymap.set("n", "<leader>u",
|
||||||
function() require("packer").sync() end,
|
function() require("packer").sync() end,
|
||||||
{ desc = "Sync packer config and update plugins"}
|
{ desc = "Sync packer config and update plugins" }
|
||||||
)
|
)
|
||||||
|
|
||||||
-- telescope
|
-- telescope
|
||||||
|
Reference in New Issue
Block a user