dotfiles/lua/keymappings.lua

16 lines
523 B
Lua
Raw Normal View History

2021-11-25 22:10:31 +01:00
local utils = require('utils')
2024-01-04 00:45:21 +01:00
-- Clear trailing whitespace
utils.map("n", "<C-w>", "<cmd>let _s=@/<Bar>:%s/\\s\\+$//e<Bar>:let @/=_s<Bar><CR>")
-- Use tab and shift+tab to cycle buffers
utils.map("n", "<tab>", "<cmd>bn<cr>")
utils.map("n", "<S-tab>", "<cmd>bp<cr>")
2024-01-04 00:45:21 +01:00
-- Turn spellchecker on and off
2024-01-03 02:10:43 +01:00
utils.map("n", "<leader>se", "<cmd>setlocal spell spelllang=en_us<cr>")
2024-01-04 00:45:21 +01:00
utils.map("n", "<leader>sq", "<cmd>setlocal nospell")
utils.map("n", "<F3>", "<cmd>set nonumber!<CR>")
2023-09-26 01:58:40 +02:00
utils.map("n", "<leader>fe", "<cmd>Oil<CR>")