biew biew biew, a super quick scratchpad manager
- use your favorite package manager to install
slugbyte/whip.nvimand dependencies
-- example lazy nvim config
return {
"slugbyte/whip.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
config = function()
local whip = require("whip")
whip.setup({
-- its probs a good idea to have a dir dedicated to your scratchpads
dir = "~/your/whip/dir/goes-here"
})
vim.keymap.set("", "<leader>wo", whip.open, { desc = "[W]hip [O]pen" })
vim.keymap.set("", "<leader>wm", whip.make, { desc = "[W]hip [M]ake" })
vim.keymap.set("", "<leader>wd", whip.drop, { desc = "[W]hip [D]rop" })
vim.keymap.set("", "<leader>wf", whip.find_file, { desc = "[W]hip [F]ile Search" })
vim.keymap.set("", "<leader>wg", whip.find_grep, { desc = "[W]hip [G]rep Search" })
end,
}whip.nvim allows you to quickly edit and manage files in the whip dir configured with setup().
A huge benefit of whip is that it always remeber's the last whip file you
selected/created and will auto open to that file.
I use different scratchpads for different projects, and while I'm working on a particular project I tend to reference it's scratchpad over and over. I made this thing because I find it super nice to be able to quickly pop open the last scratchpad I used.
whip.open()open last selected whip file, if no file is selected it will triggerwhip.find_file()whip.make()prompt to create a new whip filewhip.drop()delete a whip file from a telescope find and a confirm promptwhip.find_file()telescope whip fileswhip.find_grep()telescope grep whip files
:WhipOpencallswhip.open():WhipMakecallswhip.make():WhipDropcallswhip.drop():WhipFindFilecallswhip.find_file():WhipFindGrepcallswhip.find_grep()
Run :checkhealth whip to check for trouble with your configuration
whip.nvim creates a .whip.json in your whip dir to keep track of
your last selected file.
If you like this project star the GitHub repository :)
