{"id":21474630,"url":"https://github.com/pabsan-0/vim-snippets","last_synced_at":"2026-01-04T11:04:21.941Z","repository":{"id":259871562,"uuid":"879688821","full_name":"pabsan-0/vim-snippets","owner":"pabsan-0","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-30T09:19:11.000Z","size":1192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T07:44:54.337Z","etag":null,"topics":["repos-ecosystem","vim","vim-plug","vim-plugins"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pabsan-0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-28T11:28:37.000Z","updated_at":"2025-01-30T23:21:13.000Z","dependencies_parsed_at":"2024-10-28T14:53:19.176Z","dependency_job_id":"9dbeaa23-4c79-4a9c-a38b-1f1069ddc050","html_url":"https://github.com/pabsan-0/vim-snippets","commit_stats":null,"previous_names":["pabsan-0/vim-snippets"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pabsan-0/vim-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fvim-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fvim-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fvim-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fvim-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pabsan-0","download_url":"https://codeload.github.com/pabsan-0/vim-snippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fvim-snippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28202229,"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":"2026-01-04T02:00:06.065Z","response_time":58,"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":["repos-ecosystem","vim","vim-plug","vim-plugins"],"created_at":"2024-11-23T10:24:20.223Z","updated_at":"2026-01-04T11:04:21.902Z","avatar_url":"https://github.com/pabsan-0.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snippets.vim\n\nVim integration of snippets - quick code bites with an easy copy-pasting workflow.\n\n![image](assets/demo.gif)\n\nSearch powered by [fzf.vim](https://github.com/junegunn/fzf.vim), [rg]() and [batcat]().\n\n## Installation\n\nThis plugin requires you to have `fzf.vim` first, as well as `rg` to efficiently search your cards. For colored `fzf`-preview you'll also need `batcat`.\n\nInstall requisites:\n\n```\nsudo apt install fzf ripgrep\nsudo apt install batcat  # optional\n```\n\nUsing vim-plug:\n\n```\nPlug 'junegunn/fzf', { 'do': { -\u003e fzf#install() } }\nPlug 'junegunn/fzf.vim'\nPlug 'pabsan-0/vim-snippets'\n```\n\nSet a custom path in your `.vimrc` where your snippets are to be stored and loaded from:\n\n```\nset g:snippets_directory = ~/snippets  \" custom path to store your notes\n```\n\n## Usage \n\nIf unused, `\u003cleader\u003es` will be the default entrypoint to the Snippets plugin:\n\n- In normal mode, this mapping will open a snippet search FZF interface with the following controls:\n    - `enter`: paste snippet into the current buffer.\n    - `tab`: alternate ripgrep and fzf (content / card name) search.\n    - `C-a`: **a**dd a new snippet.\n    - `C-t`: open snippet in a new **t**ab.\n- In visual mode, creates a new snippet from the current visual selection.\n\nThe plugin also exposes these commands:\n\n- `SnippetsRg`: launches snippet search by file content.\n- `SnippetsFzf`: launches snippet search by file name.\n- `SnippetsCreate`: prompts for a filename and creates an empty snippet.\n- `SnippetsCreateVisual`: prompts for a filename and creates a snippet from the current selection.\n\n## Features\n\n### Managing your personal snippets \n\nYou'll need a snippet collection to draw from, maybe under version control. Control it by setting this variable:\n\n- `g:snippets_directory`: existing dir to look for and create new snippets into.\n\nFind my collection at [pabsan-0/snippets](https://github.com/pabsan-0/snippets).\n\n### Alternating search modes better\n\nIf you've configured `fzf` to store a search history, you can keep your query when alternating modes with `tab`. In order to do that, add the following lines to `.vimrc`.\n\n```\nlet g:fzf_history_dir = '~/.local/share/fzf-history'\n\n\" Optional: Remap bindings to keep \u003cc-p\u003e and \u003cc-n\u003e as usual for up-down navigation\nlet $FZF_DEFAULT_OPTS = '--bind ctrl-n:down,ctrl-p:up,alt-n:next-history,alt-p:prev-history'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabsan-0%2Fvim-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpabsan-0%2Fvim-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabsan-0%2Fvim-snippets/lists"}