From 72f02989f4c6906fb1b6e76640d9f803903c9501 Mon Sep 17 00:00:00 2001 From: srdusr Date: Sat, 4 Feb 2023 23:46:32 +0200 Subject: Changed packer keybindings to then Capital P and whatever corresponding key needed --- lua/user/keys.lua | 53 +++++++---------------------------------------------- 1 file changed, 7 insertions(+), 46 deletions(-) (limited to 'lua') diff --git a/lua/user/keys.lua b/lua/user/keys.lua index 46333e1..8feee85 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -91,8 +91,8 @@ map("n", "[", ":tabprev") map("n", "]", ":tabnext") -- "Zoom" a split window into a tab and/or close it -map("n", ",", ":tabnew %") -map("n", ".", ":tabclose") +--map("n", ",", ":tabnew %") +--map("n", ".", ":tabclose") -- Vim TABs map("n", "1", "1gt") @@ -263,53 +263,14 @@ vim.cmd([[ ]]) map("n", "", ":call OpenLastClosed() ") --- Function to quickly open/hide terminal window inside vim --- Terminal operation when --- 1. terminal is open in split window, it closes the window (terminal still --- running) --- 2. terminal open in buffer, it moves window into split window --- 3. no termial instance running then it opens new terminal instance in split --- window -local function Term() - local terminal_buffer_number = vim.fn.bufnr("term://") - local terminal_window_number = vim.fn.bufwinnr("term://") - local window_count = vim.fn.winnr("$") - - if terminal_window_number > 0 and window_count > 1 then - vim.fn.execute(terminal_window_number .. "wincmd c") - elseif terminal_buffer_number > 0 and terminal_buffer_number ~= vim.fn.bufnr("%") then - vim.fn.execute("sb " .. terminal_buffer_number) - elseif terminal_buffer_number == vim.fn.bufnr("%") then - vim.fn.execute("bprevious | sb " .. terminal_buffer_number .. " | wincmd p") - else - vim.fn.execute("sp term://zsh") - end -end - -vim.api.nvim_create_user_command("Term", Term, { - desc = "Open terminal window", -}) - -map("n", "g", vim.cmd.Term) -map("t", "g", "") - ---map("n", "",function -----local window_id = --- local Toggle_float = vim.api.nvim_win_get_config() ---if vim.api.nvim_win_get_config(window_id).relative ~= '' then --- vim.api.nvim_command("nvim_win_close()") --- -- window with this window_id is floating ---end ---end ---) ---------------- Plugin Operations ---------------- -- Packer -map("n", "pc", "PackerCompile") -map("n", "pi", "PackerInstall") -map("n", "ps", "PackerSync") -map("n", "pS", "PackerStatus") -map("n", "pu", "PackerUpdate") +map("n", "Pc", "PackerCompile") +map("n", "Pi", "PackerInstall") +map("n", "Ps", "PackerSync") +map("n", "PS", "PackerStatus") +map("n", "Pu", "PackerUpdate") -- Tmux navigation (aserowy/tmux.nvim) map('n', '', 'NavigatorLeft') -- cgit v1.2.3