-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
I wanted to set up a scratch buffer that is toggle-able (like :ScratchPreview) and automatically focuses my cursor on the buffer when opening it. I was expecting a :ScratchToggle command, but did not find one.
Here's my current config for scratch in lazy.nvim:
return {
"mtth/scratch.vim",
keys = {
{ "<leader>sp", ":ScratchPreview<CR>", mode = "n", noremap = true, silent = true },
{ "<leader>sp", ":ScratchSelection<CR>", mode = "v", noremap = true, silent = true },
},
init = function()
vim.g.scratch_no_mappings = 1
vim.g.scratch_persistence_file = "~/scratchpad/vim-scratchpad.txt"
vim.g.scratch_autohide = 0
end,
}When I want to open a scratch window, I use <leader>sp. This opens a scratch buffer, but I have to manually move the cursor there.
Any chance this could be added to the plugin?