24 lines
886 B
Lua
24 lines
886 B
Lua
-- Clear trailing whitespace
|
|
vim.keymap.set("n", "<C-w>", "<cmd>let _s=@/<Bar>:%s/\\s\\+$//e<Bar>:let @/=_s<Bar><CR>")
|
|
|
|
-- Use tab and shift+tab to cycle buffers
|
|
vim.keymap.set("n", "<tab>", "<cmd>bn<cr>")
|
|
vim.keymap.set("n", "<S-tab>", "<cmd>bp<cr>")
|
|
|
|
-- Turn spellchecker on and off
|
|
vim.keymap.set("n", "<leader>se", "<cmd>setlocal spell spelllang=en_us<cr>")
|
|
vim.keymap.set("n", "<leader>sq", "<cmd>setlocal nospell<cr>")
|
|
|
|
vim.keymap.set("n", "<F3>", "<cmd>set nonumber!<CR>")
|
|
vim.keymap.set("n", "<leader>fe", "<cmd>Oil<CR>")
|
|
|
|
vim.keymap.set("n", ']d', "<cmd>lua vim.diagnostic.goto_next()<CR>")
|
|
vim.keymap.set("n", '[d', "<cmd>lua vim.diagnostic.goto_prev()<CR>")
|
|
vim.keymap.set("n", "<leader>aa", require("actions-preview").code_actions)
|
|
|
|
-- Outline!!
|
|
vim.keymap.set("n", "<leader>o", "<cmd>Outline<CR>")
|
|
|
|
|
|
-- Close all buffers
|
|
vim.keymap.set("n", '<C-S-x>', "<cmd>bufdo bd<CR>")
|