This repository has been archived on 2024-10-06. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/lua/keymappings.lua

16 lines
558 B
Lua
Raw Normal View History

2021-11-25 22:10:31 +01:00
local utils = require('utils')
2023-08-03 02:49:25 +02:00
-- Clear highlights (search + trailing whitespace)
utils.map('n', '<C-h>', '<cmd>noh<CR>')
utils.map("n", "<C-k>", "<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>")
-- Turn spellchecker on
utils.map("n", "<leader>s", "<cmd>setlocal spell spelllang=en_us<cr>")
2023-08-03 02:49:25 +02:00
-- Toggle line numbers and file tree
utils.map("n", "<F3>", "<cmd>set nonumber!<CR>")
2023-09-26 01:58:40 +02:00
utils.map("n", "<leader>fe", "<cmd>Oil<CR>")