nvimdev / dashboard-nvim

vim dashboard
MIT License
2.21k stars 179 forks source link

Add ability to easily close dashboard and enter insert mode #367

Open perrin4869 opened 1 year ago

perrin4869 commented 1 year ago

Is your feature request related to a problem? Please describe. When I open neovim without the dashboard and I just want to type something random, I can always just hit i and type. This is not possible with dashboard out of the box.

Describe the solution you'd like This is not currently possible because dashboard will randomly select shortcut keys for opening recent files/projects, and those may conflict with the mapping you may set.

Describe alternatives you've considered I tried the following:

cat home/.config/nvim/after/ftplugin/dashboard.lua
vim.keymap.set("n", "i", function() vim.cmd.bdelete(); vim.cmd.startinsert() end, { buffer=true,silent=true,noremap=true,desc="dashboard.exit" })

It works when i doesn't get used as a shortcut by dashboard.nvim.

glepnir commented 1 year ago

I will try add this in next version. more theme will split to single repo

Allaman commented 2 weeks ago

I added a shortcut to open a new buffer. See my config. So just hitting 'e' in my dashboard opens an empty buffer in insert mode