2024-03-26 11:51:53 +00:00
|
|
|
-- Keymaps
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
|
|
|
vim.keymap.set('n', '<leader><F8>', vim.cmd.UndotreeToggle)
|
|
|
|
vim.keymap.set('n', '<leader>p', [["_dP]])
|
|
|
|
vim.keymap.set('n', '<leader>fa', vim.lsp.buf.format)
|
|
|
|
vim.keymap.set('n', '<leader>m', ":Mason<CR>")
|
2024-03-26 16:06:54 +00:00
|
|
|
vim.keymap.set('n', '<leader>e',':Explore<CR>', {noremap = false, silent=true})
|
|
|
|
vim.keymap.set('n', '<leader>le',':Lexplore<CR>', {noremap = false, silent=true})
|
2024-03-26 11:51:53 +00:00
|
|
|
local osname = vim.loop.os_uname().sysname
|
|
|
|
if osname == "Windows_NT" then
|
|
|
|
vim.keymap.set('n', '<leader>x', function() print("sorry this is windows!") end)
|
|
|
|
elseif osname == "Linux" then
|
|
|
|
-- Linux only!!
|
|
|
|
vim.keymap.set('n', '<leader>x', "<cmd>!chmod +x %<CR>", { silent = true })
|
|
|
|
end
|