local utils = require("user.utils") local nmap = utils.nmap -- Move focus between splits nmap("h", "h") -- Leader+h - focus left split nmap("l", "l") -- Leader+l - focus right split nmap("j", "j") -- Leader+j - focus split under focused one nmap("k", "k") -- Leader+k - focus split above focused one -- Resize splits nmap("", ":resize -2") -- Control+j - decrease split height nmap("", ":resize +2") -- Control+k - increase split height nmap("", ":vert resize -5") -- Control+h - decrease split width nmap("", ":vert resize +5") -- Control+l - increase split width -- Open splits nmap("sv", ":vs") -- Leader+s+v - split current window vertically nmap("sh", ":split") -- Leader+s+h - split current window horizontally -- Tabs nmap("H", ":tabprev") -- Shift+h - open previous tab nmap("L", ":tabnext") -- Shift+l - open next tab nmap("", ":tabnew") -- Control+t - open new empty tab nmap("", ":tabclose") -- Control+w - close current tab nmap("", ":-tabmove") -- Switch current tab with previous one nmap("", ":+tabmove") -- Switch current tab with next one -- Telescope nmap("f", ":Telescope find_files") -- Leader+f - find files with Telescope nmap("p", ":Telescope") -- Leader+p - open Telescope as command palette -- LSP nmap("gd", ":lua vim.lsp.buf.definition()") -- g+d - Go to definition nmap("gr", ":lua vim.lsp.buf.references()") -- g+r - Show references nmap("K", ":lua vim.lsp.buf.hover()") -- Shift+k - Show documentation in hover window nmap("", ":lua vim.lsp.buf.rename()") -- F2 - Rename thing under the cursor nmap("d", ':lua vim.diagnostic.open_float(nil, {focus = false, scope = "cursor"})') -- Leader+d - show diagnostics in float window -- Git nmap("gg", ":G") -- Leader+g+g - open vim-fugitive window