kitchen sink

This commit is contained in:
2025-01-24 13:56:11 -06:00
parent a0ebc39b59
commit 8eaa615596
25 changed files with 444 additions and 412 deletions

View File

@ -14,8 +14,8 @@ map('v', '<S-j>', ":m '>+1<CR>gv=gv", { desc = 'Move selected text down.' })
map('n', '<S-j>', 'mzJ`z<cmd>delm z<CR>') -- when combining lines
map('n', 'n', 'nzzzv') -- when searching
map('n', 'N', 'Nzzzv')
map('n', '<C-d>', '<C-d>zz') -- half page jumping
map('n', '<C-u>', '<C-u>zz')
map('n', '<C-d>', '<C-d>zzzv') -- half page jumping
map('n', '<C-u>', '<C-u>zzzv')
map('n', '<leader>x', function() -- execute order 111
local fn = vim.fn.expand("%:p")
@ -33,12 +33,6 @@ map('n', '<leader>x', function() -- execute order 111
end
end, { desc = 'toggle executable flag of the file' })
-- tabs
map('n', '[]', '<cmd>tabnew<CR>')
map('n', '][', '<cmd>tabc<CR>')
map('n', '[[', '<cmd>tabp<CR>')
map('n', ']]', '<cmd>tabn<CR>')
-- good spell suggestion ui
-- (stolen from https://github.com/neovim/neovim/pull/25833)
vim.keymap.set('n', 'z=', function()
@ -56,3 +50,11 @@ vim.keymap.set('n', 'z=', function()
local prompt = 'Change '..vim.inspect(cword)..' to:'
vim.ui.select(vim.fn.spellsuggest(cword, vim.o.lines), { prompt = prompt }, spell_on_choice)
end, { desc = 'Shows spelling suggestions' })
-- quickfix
map('n', '<M-j>', '<cmd>cnext<CR>zz')
map('n', '<M-k>', '<cmd>cprev<CR>zz')
map('n', '<M-c>', '<cmd>cclose<CR>')
-- open up Ex
map('n', '<leader>c', '<cmd>Ex<CR>')