Skip to content

Commit

Permalink
feat(nvim): add <Tab> to toggle folds
Browse files Browse the repository at this point in the history
  • Loading branch information
kutsan committed Jan 2, 2025
1 parent 29f3191 commit 5b4da2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .config/nvim/plugin/mappings/normal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ local keymap = vim.keymap
local cmd = vim.cmd
local fn = vim.fn

-- Set <C-i> to itself to support separate mappings for <Tab> and <C-i>.
keymap.set('n', '<C-i>', '<C-i>')

-- Quickly close current window.
keymap.set('n', '<Space>q', '<C-w>q')

Expand All @@ -11,6 +14,9 @@ keymap.set('n', '<C-k>', '<C-w>k')
keymap.set('n', '<C-h>', '<C-w>h')
keymap.set('n', '<C-l>', '<C-w>l')

-- Toggle folds.
keymap.set('n', '<Tab>', 'za')

-- Always send contents of a `x` command to the black hole register.
keymap.set('n', 'x', '"_x')

Expand Down

0 comments on commit 5b4da2c

Please sign in to comment.