dotfiles/.config/nvim/lua/user/keymaps.lua

10 lines
450 B
Lua

vim.g.mapleader = ' ' -- set <SPACE> as leader key
vim.keymap.set('n', '<leader>w', '<cmd>write<cr>') -- write file with leader w
vim.keymap.set('n', '<leader>e', '<cmd>NvimTreeToggle<cr>') -- open file explorer with leader e
-- set split navigation to cntrl+j/k/h/l
vim.keymap.set('n', '<C-j>', '<C-w>j')
vim.keymap.set('n', '<C-k>', '<C-w>k')
vim.keymap.set('n', '<C-h>', '<C-w>h')
vim.keymap.set('n', '<C-l>', '<C-w>l')