You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
836 B
34 lines
836 B
local function map(mode, lhs, rhs, opts)
|
|
local options = { noremap = true }
|
|
if opts then
|
|
options = vim.tbl_extend("force", options, opts)
|
|
end
|
|
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
|
end
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
map("n", "j", "gj")
|
|
map("n", "k", "gk")
|
|
|
|
map("n", "<C-h>", "<C-w>h")
|
|
map("n", "<C-j>", "<C-w>j")
|
|
map("n", "<C-k>", "<C-w>k")
|
|
map("n", "<C-l>", "<C-w>l")
|
|
|
|
map("i", "<A-a>", "ā")
|
|
map("i", "<A-e>", "ē")
|
|
map("i", "<A-i>", "ī")
|
|
map("i", "<A-o>", "ō")
|
|
map("i", "<A-u>", "ū")
|
|
|
|
map("n", "<F12>", ":w|:!texbld run compile")
|
|
map("n", "<F5>", ":w|:!./test.sh")
|
|
|
|
vim.keymap.set("x", "<leader>p", [["_dP]])
|
|
vim.keymap.set("n", "<leader>vc", "<cmd>e ~/.config/nvim<CR>");
|
|
vim.keymap.set("n", "<leader>vz", "<cmd>e ~/.zshrc<CR>");
|
|
|
|
vim.keymap.set("n", "<leader>fmt", function()
|
|
vim.lsp.buf.formatting_sync()
|
|
end)
|