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>")
|
2023-07-30 04:26:25 +02:00
|
|
|
|
|
|
|
-- 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
|
2023-07-30 04:26:25 +02:00
|
|
|
utils.map("n", "<F3>", "<cmd>set nonumber!<CR>")
|
|
|
|
utils.map("n", "<F5>", "<cmd>NvimTreeToggle<CR>")
|