vim.o.timeout = false -- Key mapping local map = vim.api.nvim_set_keymap -- Configuration fast editing. local opts = {silent = true} map('n', '\\rconf', ':source $HOME/lib/nvim/init.lua\n', opts) map('n', '\\econf', ':e $HOME/lib/nvim/init.lua\n', opts) map('n', '\\emap', ':e $HOME/lib/nvim/lua/maps.lua\n', opts) -- Moving around. map('n', '\\home', ":cd $HOME\n", opts) map('n', '\\lex', ":Lexplore\n", opts) map('n', '\\ex', ":Explore\n", opts) -- Search map('n', '\\noh', ':noh\n', opts) -- Tabs. map('n', '\\tn', ':tabnew\n', opts) -- Line -- map('n', '\\nl', ':if &cursorline==1set nocursorlineelse set cursorelineendif', opts) -- Windows -- Moving opts = {silent = true} map('n', '', 'l', opts) map('n', '', 'h', opts) map('n', '', 'k', opts) map('n', '', 'j', opts) -- Resizing map('n', '', '+', opts) map('n', '', '-', opts) map('n', '', '3<', opts) map('n', '', '3>', opts) map('n', '', '3>', opts) map('n', '', '3<', opts) -- Splitting map('n', '\\|', 'v', opts) map('n', '\\-', 's', opts)