{"id":13937160,"url":"https://github.com/reconquest/vim-autosurround","last_synced_at":"2025-04-29T04:31:56.159Z","repository":{"id":49406048,"uuid":"44061763","full_name":"reconquest/vim-autosurround","owner":"reconquest","description":"Automatically insert pairs (brackets, quotes) where they are supposed to be","archived":false,"fork":false,"pushed_at":"2022-07-31T09:53:01.000Z","size":44,"stargazers_count":55,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T13:11:13.663Z","etag":null,"topics":["braces","pair","surround","vim"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/reconquest.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}},"created_at":"2015-10-11T17:16:58.000Z","updated_at":"2024-11-26T14:24:49.000Z","dependencies_parsed_at":"2022-09-22T16:51:41.957Z","dependency_job_id":null,"html_url":"https://github.com/reconquest/vim-autosurround","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fvim-autosurround","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fvim-autosurround/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fvim-autosurround/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fvim-autosurround/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reconquest","download_url":"https://codeload.github.com/reconquest/vim-autosurround/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251432949,"owners_count":21588680,"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":["braces","pair","surround","vim"],"created_at":"2024-08-07T23:03:20.533Z","updated_at":"2025-04-29T04:31:55.886Z","avatar_url":"https://github.com/reconquest.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Plugin will automatically add enclosing `)` (or any other) at appropriate place to be.\n\n![gif](https://cloud.githubusercontent.com/assets/674812/10417889/f530e936-703a-11e5-8f77-2b7f6fe23191.gif)\n\nCurrently, following cases are supported:\n\n* adding pair after call-like construction:\n  ```\n  |something()        type: test( -\u003e\n  test(|something())\n  ```\n\n* adding pair after string:\n  ```\n  |\"blah\"       type: test( -\u003e\n  test(|\"blah\")\n  ```\n\n* adding pair after argument:\n  ```\n  something(|arg1, arg2)        type: test( -\u003e\n  something(test(|arg1), arg2)\n  ```\n\n  ```\n  something(arg1, |arg2)        type: test( -\u003e\n  something(arg1, test(arg2))\n  ```\n\n* adding pairs in conditionals:\n  ```\n  if |blah != nil       type test( -\u003e\n  if test(blah) != nil\n  ```\n\n* autocorrection:\n  ```\n  something(|arg1, arg2)        type: test( -\u003e\n  something(test(|arg1), arg2)  move cursor after last ) and type ) -\u003e\n  something(test(arg1), arg2)|\n  something(test(arg1, arg2))|\n  ```\n\n# Installation \u0026 Usage\n\n```viml\nPlug 'vim-autosurround'\n```\n\nPlugin provides only python API.\n\n# Extension\n\nPlugin provides API, which can be used to extend surround logic:\n\n* `index = autosurround.register_finder(callback)`, `callback` is a function\n  of one argument `cursor`, which is `vim.current.window.cursor`.\n\n  `callback` should return tuple `(line, column)` with position, which will be\n  used for inserting pair character or `None`, if `callback` is not able to\n  find position.\n\n  `index` can be used for `unregister_finder(index)`.\n\n* `autosurround.unregister_finder(index)` will remove previously added\n  callback.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconquest%2Fvim-autosurround","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freconquest%2Fvim-autosurround","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconquest%2Fvim-autosurround/lists"}