{"id":26050256,"url":"https://github.com/aiya000/vim-scratch-buffer","last_synced_at":"2025-04-10T18:22:04.248Z","repository":{"id":279273712,"uuid":"938186657","full_name":"aiya000/vim-scratch-buffer","owner":"aiya000","description":"🚀 No more hassle with file paths! Instantly open a scratch buffer!","archived":false,"fork":false,"pushed_at":"2025-03-20T17:43:44.000Z","size":75,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T09:03:41.889Z","etag":null,"topics":["cline","quickrun","roo","roocode","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","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/aiya000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-02-24T15:00:04.000Z","updated_at":"2025-03-20T17:43:48.000Z","dependencies_parsed_at":"2025-03-12T14:40:48.852Z","dependency_job_id":null,"html_url":"https://github.com/aiya000/vim-scratch-buffer","commit_stats":null,"previous_names":["aiya000/vim-scratch-buffer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiya000%2Fvim-scratch-buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiya000%2Fvim-scratch-buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiya000%2Fvim-scratch-buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiya000%2Fvim-scratch-buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiya000","download_url":"https://codeload.github.com/aiya000/vim-scratch-buffer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248270540,"owners_count":21075794,"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":["cline","quickrun","roo","roocode","vim","vim-plugin"],"created_at":"2025-03-08T02:27:36.329Z","updated_at":"2025-04-10T18:22:04.241Z","avatar_url":"https://github.com/aiya000.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :sparkles: scratch-buffer.vim :sparkles:\n\n:rocket: **No more hassle with file paths!** The fastest way to open an instant scratch buffer.\n\nFor Vim/Neovim.\n\n- - -\n\n![](./readme/logo.jpg)\n\n- - -\n\nThis Vim plugin is created by **Cline (Roo Code)** and me!\n\n- - -\n\n## Table of Contents\n\n- [:sparkles: scratch-buffer.vim :sparkles:](#sparkles-scratch-buffervim-sparkles)\n  - [:wrench: Quick Start](#wrench-quick-start)\n  - [:fire: Why scratch-buffer.vim?](#fire-why-scratch-buffervim)\n  - [:zap: Supercharge with vim-quickrun!](#zap-supercharge-with-vim-quickrun)\n  - [:balance_scale: Comparison with scratch.vim](#balance_scale-comparison-with-scratchvim)\n    - [:gear: Detailed Usage](#gear-detailed-usage)\n  - [:keyboard: Default Keymappings](#keyboard-default-keymappings)\n  - [:sparkles: scratch.vim Compatibility](#sparkles-scratchvim-compatibility)\n\n## :wrench: Quick Start\n\n```vim\n:ScratchBufferOpen  \" Open a temporary buffer using default options\n:ScratchBufferOpen md sp 5  \" Open a temporary Markdown buffer with :sp and height 5\n:ScratchBufferOpenFile ts vsp 100  \" Open a persistent TypeScript buffer with :vsp and width 100\n:ScratchBufferOpenNext  \" Open next temporary buffer\n:ScratchBufferOpenFileNext  \" Open next persistent buffer\n```\n\nPlease see '[Detailed Usage](#gear-detailed-usage)' section for more information.\n\n## :fire: Why scratch-buffer.vim?\n\n- **Open instantly!** Just run `:ScratchBufferOpen`!\n- **No file management!** Perfect for quick notes and testing code snippets.\n- **Works anywhere!** Whether in terminal Vim or GUI, it's always at your fingertips.\n\n## :zap: Supercharge with vim-quickrun!\n\n:bulb: **Combine it with [vim-quickrun](https://github.com/thinca/vim-quickrun) to execute code instantly!**\n\n```vim\n\" Write TypeScript code...\n:ScratchBufferOpen ts\n\n\" ...and run it immediately!\n:QuickRun\n```\n\n## :balance_scale: Comparison with scratch.vim\n\n[scratch.vim](https://github.com/mtth/scratch.vim) is a great plugin.\nHowever, vim-scratch-buffer adds more features.\n\nCompared to scratch.vim, vim-scratch-buffer provides these additional features:\n\n- Flexible buffer management\n    - Open multiple buffers with sequential numbering (`:ScratchBufferOpenNext`)\n    - Quick access to recently used buffers (`:ScratchBufferOpen`)\n    - When you want to take notes on different topics, scratch.vim only allows one buffer\n    - See `:help :ScratchBufferOpen` and `:help :ScratchBufferOpenNext`\n\n- Buffer type options\n    - Choose between writeable buffers or temporary buffers\n    - Automatic saving for file buffers when enabled\n    - Convert temporary buffers to persistent ones when needed\n    - See `:help :ScratchBufferOpen` and `:help :ScratchBufferOpenFile`\n\n- Customization options\n    - Specify filetype for syntax highlighting\n    - Choose opening method (`:split` or `:vsplit`)\n    - Control buffer height/width\n    - Configurable auto-hiding behavior\n\n### :gear: Detailed Usage\n\n```vim\n\" Basic Usage\n\n\" Open a temporary buffer using default settings\n:ScratchBufferOpen\n\n\" Same as :ScratchBufferOpen but opens a writable persistent buffer\n:ScratchBufferOpenFile\n```\n\n```vim\n\" Open a new scratch buffer with a specific filetype\n\n\" Example: Markdown\n:ScratchBufferOpen md\n\n\" Example: TypeScript\n:ScratchBufferOpen ts\n\n\" Example: No filetype\n:ScratchBufferOpen --no-file-ext\n```\n\n```vim\n\" Open multiple scratch buffers\n:ScratchBufferOpen md      \" Opens most recently used buffer\n:ScratchBufferOpenNext md  \" Always creates a new buffer\n```\n\n```vim\n\" Open a small buffer at the top for quick notes\n:ScratchBufferOpen md sp 5\n:ScratchBufferOpen --no-file-ext sp 5\n```\n\n```vim\n\" Delete all scratch files and buffers\n:ScratchBufferClean\n```\n\n## :keyboard: Default Keymappings\n\nWhen `g:scratch_buffer_use_default_keymappings` is enabled (default: `v:false`), the following keymappings are available:\n\n```vim\n\" Quick open commands (execute immediately)\nnnoremap \u003csilent\u003e \u003cleader\u003eb \u003cCmd\u003eScratchBufferOpen\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003eB \u003cCmd\u003eScratchBufferOpenFile\u003cCR\u003e\n\n\" Interactive commands (allows adding arguments)\nnnoremap \u003cleader\u003e\u003cleader\u003eb :\u003cC-u\u003eScratchBufferOpen\u003cSpace\u003e\nnnoremap \u003cleader\u003e\u003cleader\u003eB :\u003cC-u\u003eScratchBufferOpenFile\u003cSpace\u003e\n```\n\nThe quick open commands create buffers with default settings, while the interactive commands let you specify file extension, open method, and buffer size.\n\nYou can customize these mappings by disabling the defaults:\n\n```vim\nlet g:scratch_buffer_use_default_keymappings = v:false\n```\n\nAnd then defining your own:\n\n```vim\n\" Example custom mappings\nnnoremap \u003csilent\u003e \u003cleader\u003es \u003cCmd\u003eScratchBufferOpen\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003eS \u003cCmd\u003eScratchBufferOpenFile\u003cCR\u003e\n```\n\n## :sparkles: scratch.vim Compatibility\n\nTo make the plugin behave like scratch.vim, you can enable automatic buffer hiding!\nWhen enabled, scratch buffers will automatically hide when you leave the window.\nYou can configure this behavior separately for temporary buffers and file buffers.\n\nEnable both types of buffer hiding with:\n\n```vim\nlet g:scratch_buffer_auto_hide_buffer = #{\n  \\ when_tmp_buffer: v:true,\n  \\ when_file_buffer: v:true,\n\\ }\n```\n\nOr enable hiding for only temporary buffers:\n\n```vim\nlet g:scratch_buffer_auto_hide_buffer = #{ when_tmp_buffer: v:true }\n```\n\nOr enable hiding for only file buffers:\n\n```vim\nlet g:scratch_buffer_auto_hide_buffer = #{ when_file_buffer: v:true }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiya000%2Fvim-scratch-buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiya000%2Fvim-scratch-buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiya000%2Fvim-scratch-buffer/lists"}