Skip to content

Commit 4f79246

Browse files
go to tab
1 parent 0e3d7f6 commit 4f79246

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

lua/macos/init.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,36 @@ function M.setup(opts)
5959
vim.keymap.set('n', '<D-[>', '<<', silent)
6060
vim.keymap.set('v', '<D-[>', '<', silent)
6161
vim.keymap.set('i', '<D-[>', '<C-O><<', silent)
62+
63+
if opts.go_to_tab then
64+
vim.keymap.set('n', '<D-1>', function()
65+
opts.go_to_tab(1)
66+
end, silent)
67+
vim.keymap.set('n', '<D-2>', function()
68+
opts.go_to_tab(2)
69+
end, silent)
70+
vim.keymap.set('n', '<D-3>', function()
71+
opts.go_to_tab(3)
72+
end, silent)
73+
vim.keymap.set('n', '<D-4>', function()
74+
opts.go_to_tab(4)
75+
end, silent)
76+
vim.keymap.set('n', '<D-5>', function()
77+
opts.go_to_tab(5)
78+
end, silent)
79+
vim.keymap.set('n', '<D-6>', function()
80+
opts.go_to_tab(6)
81+
end, silent)
82+
vim.keymap.set('n', '<D-7>', function()
83+
opts.go_to_tab(7)
84+
end, silent)
85+
vim.keymap.set('n', '<D-8>', function()
86+
opts.go_to_tab(8)
87+
end, silent)
88+
vim.keymap.set('n', '<D-9>', function()
89+
opts.go_to_tab(9)
90+
end, silent)
91+
end
6292
end
6393

6494
return M

0 commit comments

Comments
 (0)