]> git.rmz.io Git - dotfiles.git/commitdiff
nvim/snacks: replace n with i in dashboard
authorSamir Benmendil <me@rmz.io>
Thu, 13 Mar 2025 22:04:46 +0000 (22:04 +0000)
committerSamir Benmendil <me@rmz.io>
Thu, 13 Mar 2025 22:04:46 +0000 (22:04 +0000)
I want it to behave similar to original vim whire the "dashboard" is
closed when I inter insert mode.

nvim/lua/plugins/snacks.lua

index 89eec464173d3fc2614b4327c63cf69cd0191f08..4b34734872bc3aaa28ee109c4c5bc5ac0245e8f5 100644 (file)
@@ -49,7 +49,7 @@ return {
           ---@type snacks.dashboard.Item[]
           keys = {
             { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
           ---@type snacks.dashboard.Item[]
           keys = {
             { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
-            { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" },
+            { icon = " ", key = "i", desc = "New File", action = ":ene | startinsert" },
             { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" },
             { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" },
             { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" },
             { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" },
             { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" },
             { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" },