Windows, tabs and fast cd's remapping

This commit is contained in:
Vlad 2023-11-23 16:07:12 +03:00
parent 051071f7da
commit 8e1d8c50b6
1 changed files with 22 additions and 0 deletions

View File

@ -1,2 +1,24 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("n", "<leader>cdp", ":cd %:p:h<CR>")
vim.keymap.set("n", "<leader>cdc", ":cd $HOME/.config/nvim<CR>")
vim.keymap.set("n", "<leader>cdb", ":cd -<CR>")
--- Tabs
vim.keymap.set("n", "<leader>tt", vim.cmd.tabnew)
vim.keymap.set("n", "<leader>tq", vim.cmd.tabclose)
vim.keymap.set("n", "<leader>to", vim.cmd.tabonly)
vim.keymap.set("n", "<leader>te", vim.cmd.tab)
vim.keymap.set("n", "<leader>th", vim.cmd.tabprevious)
vim.keymap.set("n", "<leader>tl", vim.cmd.tabnext)
for i = 1, 9, 1 do
vim.keymap.set("n", "<leader>t"..i, ":"..i.."tabnext<CR>")
end
--- Windows
vim.keymap.set("n", "<leader>ws", vim.cmd.split)
vim.keymap.set("n", "<leader>wv", vim.cmd.vsplit)
vim.keymap.set("n", "<leader>wq", vim.cmd.quit)