[nvim] Convert init.vim to init.lua and copy over a bit of the vimrc config to some lua scripts

This is neat!
This commit is contained in:
Eryn Wells 2022-05-28 23:57:56 -07:00
parent 0d28c3745c
commit 8262907b64
4 changed files with 138 additions and 29 deletions

22
config/nvim/lua/keys.lua Normal file
View file

@ -0,0 +1,22 @@
-- Eryn Wells <eryn@erynwells.me>
local map = vim.keymap.set
vim.g.mapleader = ","
local options = { silent = true }
-- Allow starting commands with ; instead of typing Shift-;. Save lots of keypresses!
map('n', ';', ':')
map('n', '<C-h>', '<C-w>h', options)
map('n', '<C-j>', '<C-w>j', options)
map('n', '<C-k>', '<C-w>k', options)
map('n', '<C-l>', '<C-w>l', options)
map('n', '<C-n>', ':bn<CR>', options)
map('n', '<C-p>', ':bp<CR>', options)
map('n', '<leader><space>', function()
vim.exec [[ setlocal invhlsearch ]]
end, options)