Create and push an initial working version of this repo before I change things on this machine Signed-off-by: Robert Morrison <robert@closedless.xyz>
39 lines
1.1 KiB
Lua
39 lines
1.1 KiB
Lua
-- Non plugin keybindings
|
|
-- These are keybinds which I want to have defined at all times
|
|
-- They only operate using neovim functionality and lua code.
|
|
|
|
local map = vim.keymap.set
|
|
|
|
map('n', '<leader>o', function()
|
|
vim.o.spell = not vim.o.spell
|
|
end, { desc = 'Toggle Spelling' })
|
|
|
|
-- Advanced window control.
|
|
local window = require('core.utils.window')
|
|
local windowMod = 1
|
|
map('n', 'H', function()
|
|
window.Modwidth(0 - windowMod)
|
|
end, { desc = 'Decrease Width' })
|
|
map('n', 'J', function()
|
|
window.Modheight(0 - windowMod)
|
|
end, { desc = 'Decrease Height' })
|
|
map('n', 'K', function()
|
|
window.Modheight(windowMod)
|
|
end, { desc = 'Increase Height' })
|
|
map('n', 'L', function()
|
|
window.Modwidth(windowMod)
|
|
end, { desc = 'Increase Width' })
|
|
|
|
map('n', '<M-h>', function()
|
|
vim.cmd.wincmd('h')
|
|
end, { desc = 'Change window ' })
|
|
map('n', '<M-j>', function()
|
|
vim.cmd.wincmd('j')
|
|
end, { desc = 'Change window ' })
|
|
map('n', '<M-k>', function()
|
|
vim.cmd.wincmd('k')
|
|
end, { desc = 'Change Window ' })
|
|
map('n', '<M-l>', function()
|
|
vim.cmd.wincmd('l')
|
|
end, { desc = 'Change Window ' })
|