summaryrefslogtreecommitdiffstats
path: root/lua/conf/binds.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/conf/binds.lua')
-rw-r--r--lua/conf/binds.lua18
1 files changed, 10 insertions, 8 deletions
diff --git a/lua/conf/binds.lua b/lua/conf/binds.lua
index 2f5673a..1426ac3 100644
--- a/lua/conf/binds.lua
+++ b/lua/conf/binds.lua
@@ -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>')