{"id":20877304,"url":"https://github.com/flatcap/vim-scratch","last_synced_at":"2025-08-16T07:06:11.539Z","repository":{"id":32153129,"uuid":"35726163","full_name":"flatcap/vim-scratch","owner":"flatcap","description":"⚙ Vim Plugin - Create a temporary workspace","archived":false,"fork":false,"pushed_at":"2022-06-12T19:25:20.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-12T16:35:21.902Z","etag":null,"topics":["file","plugin","script","temporary","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flatcap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-16T14:10:30.000Z","updated_at":"2023-02-27T23:01:45.000Z","dependencies_parsed_at":"2022-09-13T05:22:39.367Z","dependency_job_id":null,"html_url":"https://github.com/flatcap/vim-scratch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/flatcap/vim-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatcap%2Fvim-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatcap%2Fvim-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatcap%2Fvim-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatcap%2Fvim-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flatcap","download_url":"https://codeload.github.com/flatcap/vim-scratch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatcap%2Fvim-scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270679280,"owners_count":24626932,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["file","plugin","script","temporary","vim"],"created_at":"2024-11-18T06:56:35.508Z","updated_at":"2025-08-16T07:06:11.510Z","avatar_url":"https://github.com/flatcap.png","language":"Vim script","readme":"# scratch.vim\n\nCreate a temporary workspace.\n\n## Introduction\n\nSometimes it's useful to create a scratchpad in Vim -- a temporary buffer where you can work on some data, then throw it away.\nVim-Scratch simply creates a new buffer which has no filename, no swapfile, no buffer listing and no lifespan.\nThe moment you close the window the information is lost.\n\n## Workflow\n\nVim-Scratch allows you to manipulate data without cluttering the undo-history of the document.\n\nA typical workflow might be:\n\n1. I need a list of files in my document\n2. Create a temporary workspace\n3. List some files: `:r! ls -l directory`\n4. Perform some Vim magic to tidy the listing\n5. Copy the data: `:%y`\n6. Close the temporary workspace: `:q`\n7. Paste the data: `p`\n\n## Saving\n\nIf you change your mind and want to save the data, then `:write` or `:saveas`.\nVim will do the Right Thing\u0026#8482;.\n\n```viml\n:w new-filename.txt\n\n:sav another-file.txt\n```\n\nA Vim `autocmd` automatically changes the settings to make the buffer into a normal file.\n\n## Mappings\n\nBy default, Vim-Scratch has three \u0026lt;Plug\u0026gt; mappings for you to use:\n\n```viml\n\u003cPlug\u003eScratchHorizontal\n\u003cPlug\u003eScratchVertical\n\u003cPlug\u003eScratchTab\n```\n\nTo use them add a line to your `.vimrc`\ne.g.\n\n```viml\nnmap \u003cF3\u003e \u003cPlug\u003eScratchHorizontal\nnmap \u003cF4\u003e \u003cPlug\u003eScratchVertical\nnmap \u003cF5\u003e \u003cPlug\u003eScratchTab\n\nnmap \u003cLeader\u003esh \u003cPlug\u003eScratchHorizontal\nnmap \u003cLeader\u003esv \u003cPlug\u003eScratchVertical\nnmap \u003cLeader\u003est \u003cPlug\u003eScratchTab\n```\n\nAlternatively, you can call the plugin from a script:\n\n```viml\n\" Create Horizontal split\ncall scratch#CreateBuffer(0)\n\n\" Create Vertical split\ncall scratch#CreateBuffer(1)\n\n\" Create Tab\ncall scratch#CreateBuffer(2)\n```\n\n## Configuration\n\nThis plugin has no configurable parts.\n\n## License\n\nCopyright \u0026copy; Richard Russon (flatcap).\nDistributed under the GPLv3 \u003chttp://fsf.org/\u003e\n\n## See also\n\n- [flatcap.org](https://flatcap.org)\n- [GitHub](https://github.com/flatcap/vim-scratch)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatcap%2Fvim-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflatcap%2Fvim-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatcap%2Fvim-scratch/lists"}