{"id":26410499,"url":"https://github.com/reybits/scratch.nvim","last_synced_at":"2026-05-17T21:02:22.839Z","repository":{"id":282760168,"uuid":"949260889","full_name":"reybits/scratch.nvim","owner":"reybits","description":"WARNING: This plugin is still in development and may not be stable!","archived":false,"fork":false,"pushed_at":"2025-03-16T18:52:01.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T19:47:12.286Z","etag":null,"topics":["neovim","nvim","nvim-plugin","plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reybits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-16T03:18:49.000Z","updated_at":"2025-03-16T18:52:41.000Z","dependencies_parsed_at":"2025-03-16T19:47:14.997Z","dependency_job_id":"2cb31669-ebed-42d2-9d4f-ec8a4a9314c2","html_url":"https://github.com/reybits/scratch.nvim","commit_stats":null,"previous_names":["reybits/scratch.nvim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fscratch.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fscratch.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fscratch.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fscratch.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reybits","download_url":"https://codeload.github.com/reybits/scratch.nvim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244102849,"owners_count":20398386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","nvim","nvim-plugin","plugin"],"created_at":"2025-03-17T20:18:12.704Z","updated_at":"2026-05-17T21:02:22.834Z","avatar_url":"https://github.com/reybits.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neovim Scratch Buffer\n\nA Neovim plugin for quick scratch notes in a floating window. Supports\nthree note types: temporary (in-memory), local (per-project, saved to disk),\nand global (shared across projects, saved to disk). Switch between them with\n`Tab`/`S-Tab`.\n\n![scratch.nvim](https://github.com/user-attachments/assets/a409f547-12ec-4d5b-b395-b4de8d51fae9)\n\n## Features\n\n- Floating scratch window with markdown and Treesitter highlighting.\n- **Temporary notes** — in-memory, never written to disk.\n- **Local notes** — persisted per-project (`.scratch.md` at the git root).\n- **Global notes** — persisted across projects (`stdpath(\"data\")/scratch.nvim/global.md`).\n- Cycle between note types with `Tab` / `S-Tab`.\n- Notes auto-save on close, type switch, and `VimLeavePre`.\n- Configurable window size, border, title, and behavior.\n\n## Installation\n\n### [Lazy](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n    \"reybits/scratch.nvim\",\n    lazy = true,\n    keys = {\n        { \"\u003cleader\u003ets\", \"\u003ccmd\u003eScratchToggle\u003ccr\u003e\", desc = \"Toggle Scratch Buffer\" },\n    },\n    cmd = {\n        \"ScratchToggle\",\n    },\n    opts = {},\n}\n```\n\n## Configuration\n\nDefault options:\n\n```lua\nopts = {\n    title = \"Scratch\",\n    border = \"rounded\",\n    width = 0.6,\n    height = 0.6,\n\n    -- enable per-project notes\n    local_notes = true,\n\n    -- enable global notes\n    global_notes = true,\n\n    -- filename for local notes\n    local_notes_file = \".scratch.md\",\n\n    -- close window when leaving the buffer\n    close_on_leave = true,\n\n    -- window-local options (vim.wo)\n    win_opts = {\n        wrap = true,\n        linebreak = true,\n    },\n}\n```\n\nSet `local_notes = false` or `global_notes = false` to disable a note type.\nWhen only one type is enabled, the type label and switch keymaps are hidden.\n\n`win_opts` accepts any `vim.wo` option. For example:\n\n```lua\nopts = {\n    win_opts = {\n        wrap = true,\n        linebreak = true,\n        number = true,\n    },\n}\n```\n\n## Usage\n\n### Commands\n\n- `:ScratchToggle` — Open or close the scratch window.\n\n### Keymaps (inside the scratch window)\n\n| Key       | Action                        |\n|-----------|-------------------------------|\n| `q`       | Close the scratch window      |\n| `R`       | Reset (clear) the current note|\n| `Tab`     | Switch to next note type      |\n| `S-Tab`   | Switch to previous note type  |\n\n### Lua API\n\n- `require('scratch').toggle()` — Toggle the scratch window.\n- `require('scratch').close()` — Close the scratch window.\n- `require('scratch').reset()` — Clear the current note buffer.\n- `require('scratch').next_type()` — Switch to the next note type.\n- `require('scratch').prev_type()` — Switch to the previous note type.\n\n## License\n\n[MIT License](LICENSE)\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freybits%2Fscratch.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freybits%2Fscratch.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freybits%2Fscratch.nvim/lists"}