|
|
@ -43,9 +43,10 @@ vim.keymap.set("n", "<leader>X", "<cmd>!chmod -x %<CR>", { silent = true }) |
|
|
|
|
|
|
|
|
|
|
|
-- execute file |
|
|
|
vim.keymap.set("n", "<leader>,", "<cmd>e ~/.config/nvim<CR>"); |
|
|
|
vim.keymap.set("n", "<leader>r", "<cmd>so ~/.config/nvim/init.lua<CR>") |
|
|
|
vim.keymap.set("n", "<leader>e", "<cmd>!%:p<CR>", { silent = true }) |
|
|
|
|
|
|
|
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() |
|
|
@ -53,13 +54,13 @@ vim.keymap.set("n", "<leader>fmt", function() |
|
|
|
end) |
|
|
|
|
|
|
|
if os.getenv("TMUX") ~= nil then |
|
|
|
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmuxs<CR>") |
|
|
|
vim.keymap.set("n", "<C-n>", "<cmd>silent !tmux neww ncmpcpp<CR>") |
|
|
|
vim.keymap.set("n", "<C-f>", [[<cmd>silent !tmux neww "zsh -c '. ~/.zshenv; tmuxs'"<CR>]]) |
|
|
|
vim.keymap.set("n", "<C-y>", [[<cmd>silent !tmux neww ncmpcpp<CR>]]) |
|
|
|
else |
|
|
|
local function unavailable() |
|
|
|
print("Not in a tmux session") |
|
|
|
end |
|
|
|
|
|
|
|
vim.keymap.set("n", "<C-f>", unavailable) |
|
|
|
vim.keymap.set("n", "<C-n>", unavailable) |
|
|
|
vim.keymap.set("n", "<C-y>", unavailable) |
|
|
|
end |