{"id":15387365,"url":"https://github.com/rhysd/vim-operator-surround","last_synced_at":"2025-04-14T00:22:55.852Z","repository":{"id":10701244,"uuid":"12945685","full_name":"rhysd/vim-operator-surround","owner":"rhysd","description":"Vim operator mapping to enclose text objects with surrounds like paren, quote and so on.","archived":false,"fork":false,"pushed_at":"2020-10-14T14:44:28.000Z","size":118,"stargazers_count":141,"open_issues_count":13,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T14:22:04.582Z","etag":null,"topics":["operator","surround","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhysd.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":"2013-09-19T10:07:39.000Z","updated_at":"2025-02-06T14:28:10.000Z","dependencies_parsed_at":"2022-09-08T06:12:54.546Z","dependency_job_id":null,"html_url":"https://github.com/rhysd/vim-operator-surround","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/rhysd%2Fvim-operator-surround","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fvim-operator-surround/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fvim-operator-surround/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fvim-operator-surround/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhysd","download_url":"https://codeload.github.com/rhysd/vim-operator-surround/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248800072,"owners_count":21163404,"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":["operator","surround","vim","vim-plugin"],"created_at":"2024-10-01T14:53:44.463Z","updated_at":"2025-04-14T00:22:55.808Z","avatar_url":"https://github.com/rhysd.png","language":"Vim script","readme":"Operator to Surround a Text Object\n==================================\n[![Build Status](https://travis-ci.org/rhysd/vim-operator-surround.svg?branch=master)](https://travis-ci.org/rhysd/vim-operator-surround)\n\nThis plugin provides Vim operator mappings to deal with surrounds like `()`, `\"\"` and so on.\nIn addition, both end of the text object are the same character, vim-operator-surround recognizes\nthem as a surround (this behavior is customizable with some variables).\n\nIt can\n- surround a text object with a specified block.\n- replace a surround in a text object with a specified block.\n- delete a surround in a text object.\n\nThis plugin would be more useful with [vim-textobj-between](https://github.com/thinca/vim-textobj-between) or\n[vim-textobj-anyblock](https://github.com/rhysd/vim-textobj-anyblock).\nAnd you can customize and add surround definitions in global and filetype specific scope.\n\n\n## Policy of This Plugin (or The Reason Why I Don't Use [vim-surround](https://github.com/tpope/vim-surround))\n\n- **Simplicity** : All should be done with operator mappings.\n- **Extensibility** : The behavior should be highly customizable with `g:operator#surround#blocks` and text objects like [vim-textobj-multiblock](https://github.com/osyo-manga/vim-textobj-multiblock), [vim-textobj-between](https://github.com/thinca/vim-textobj-between) or [vim-textobj-anyblock](https://github.com/rhysd/vim-textobj-anyblock).\n- **Well-tested**\n\n\n## Requirements\n\nThis plugin uses [vim-operator-user](https://github.com/kana/vim-operator-user).\nPlease install it in advance.\n\n\n## Customize\n\nSet your favorite blocks to `g:operator#surround#blocks`. And control the behavior with some variables.\nPlease read [doc](doc/operator-surround.txt) for more details.\n\n\n## Example of `vimrc`\n\n```vim\n\" operator mappings\nmap \u003csilent\u003esa \u003cPlug\u003e(operator-surround-append)\nmap \u003csilent\u003esd \u003cPlug\u003e(operator-surround-delete)\nmap \u003csilent\u003esr \u003cPlug\u003e(operator-surround-replace)\n\n\n\" delete or replace most inner surround\n\n\" if you use vim-textobj-multiblock\nnmap \u003csilent\u003esdd \u003cPlug\u003e(operator-surround-delete)\u003cPlug\u003e(textobj-multiblock-a)\nnmap \u003csilent\u003esrr \u003cPlug\u003e(operator-surround-replace)\u003cPlug\u003e(textobj-multiblock-a)\n\n\" if you use vim-textobj-anyblock\nnmap \u003csilent\u003esdd \u003cPlug\u003e(operator-surround-delete)\u003cPlug\u003e(textobj-anyblock-a)\nnmap \u003csilent\u003esrr \u003cPlug\u003e(operator-surround-replace)\u003cPlug\u003e(textobj-anyblock-a)\n\n\" if you use vim-textobj-between\nnmap \u003csilent\u003esdb \u003cPlug\u003e(operator-surround-delete)\u003cPlug\u003e(textobj-between-a)\nnmap \u003csilent\u003esrb \u003cPlug\u003e(operator-surround-replace)\u003cPlug\u003e(textobj-between-a)\n```\n\n## License\n\nvim-operator-surround is distributed under MIT license.\n\n  Copyright (c) 2013-2017 rhysd\n\n  Permission is hereby granted, free of charge, to any person obtaining\n  a copy of this software and associated documentation files (the\n  \"Software\"), to deal in the Software without restriction, including\n  without limitation the rights to use, copy, modify, merge, publish,\n  distribute, sublicense, and/or sell copies of the Software, and to\n  permit persons to whom the Software is furnished to do so, subject to\n  the following conditions:\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fvim-operator-surround","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhysd%2Fvim-operator-surround","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fvim-operator-surround/lists"}