{"id":17982835,"url":"https://github.com/t9md/atom-vim-mode-plus-keymaps-for-surround","last_synced_at":"2025-04-04T02:11:03.088Z","repository":{"id":136587700,"uuid":"76224006","full_name":"t9md/atom-vim-mode-plus-keymaps-for-surround","owner":"t9md","description":"provides default keymap for surround","archived":false,"fork":false,"pushed_at":"2016-12-22T05:22:09.000Z","size":5,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-09T13:33:20.497Z","etag":null,"topics":["atom","vim-mode-plus"],"latest_commit_sha":null,"homepage":"https://atom.io/packages/vim-mode-plus-keymaps-for-surround","language":null,"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/t9md.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-12-12T05:12:56.000Z","updated_at":"2022-09-12T01:18:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d3ef303-6ec4-4736-bbff-c0ffa98a0516","html_url":"https://github.com/t9md/atom-vim-mode-plus-keymaps-for-surround","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t9md%2Fatom-vim-mode-plus-keymaps-for-surround","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t9md%2Fatom-vim-mode-plus-keymaps-for-surround/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t9md%2Fatom-vim-mode-plus-keymaps-for-surround/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t9md%2Fatom-vim-mode-plus-keymaps-for-surround/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t9md","download_url":"https://codeload.github.com/t9md/atom-vim-mode-plus-keymaps-for-surround/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247107828,"owners_count":20884797,"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":["atom","vim-mode-plus"],"created_at":"2024-10-29T18:15:20.432Z","updated_at":"2025-04-04T02:11:03.037Z","avatar_url":"https://github.com/t9md.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whats' this?\n\n:rotating_light: ***This package provide keymaps only. surround feature itself is provided by vim-mode-plus itself.***  \n\nProvides default surround keymaps for [vim-mode-plus](https://atom.io/packages/vim-mode-plus).\n\nProvides following keymaps.  \n\nUnlike tpop's vim-surround. `d s`, `c s` **auto-detect** pair char to delete/change.  \nBut this is not perfect, if fail, try manual version `d S`, `c S`.  \n\n| Mode     | Keystroke | Description                                                            |\n|:---------|:----------|:-----------------------------------------------------------------------|\n| `normal` | `y s`     | `surround` e.g. `y s i w (`                                            |\n| `normal` | `d s`     | `delete-surround-any-pair`. auto-detect surrounding char. e.g. `d s`   |\n| `normal` | `d S`     | `delete-surround` e.g. `d s (`                                         |\n| `normal` | `c s`     | `change-surround-any-pair`. auto-detect surrounding char. e.g. `c s {` |\n| `normal` | `c S`     | `change-surround`. auto-detect e.g. `c s ( {`                          |\n| `visual` | `S`       | `surround` selected text. `S (`                                        |\n\n# Don't want to move cursor after surround operator?\n\nFrom setting-view of vim-mode-plus, Check `stayOnTransformString`.\n\n# Explain behavior details in pseudo DSL\n\n```coffeescript\n\n# Normal-mode\n# -------------------------\n# Set base text. cursor is `|`.\n\ntext = \"\"\"\n  pen pin|eapple\n  apple pen\n  \"\"\"\n\n# y s\n# -------------------------\nsetText(text)\nnormal 'y s i w {',\n  text: \"\"\"\n  pen {pineapple}\n  apple pen\n  \"\"\"\n\n# `y s s` surround current line\nsetText(text)\nnormal 'y s s {',\n  text: \"\"\"\n  {pen pineapple}\n  apple pen\n  \"\"\"\n\n# d s\n# -------------------------\ntext = \"\"\"\n  pen pineapple\n  (apple {pe|n})\n  \"\"\"\n\n# `d s` delete surrounding char by auto-detect\nsetText(text)\nnormal 'd s',\n  desc: \"auto detect `{`\"\n  text: \"\"\"\n  pen pineapple\n  (apple pen)\n  \"\"\"\n\nnormal 'd s',\n  desc: \"auto detect `(`\"\n  text: \"\"\"\n  pen pineapple\n  apple pen\n  \"\"\"\n\nsetText(text)\nnormal 'd S (',\n  desc: \"manually specify surrounding char\"\n  text: \"\"\"\n  pen pineapple\n  apple {pen}\n  \"\"\"\n\n# c s\n# -------------------------\ntext = \"\"\"\n  pen pineapple\n  (apple {pe|n})\n  \"\"\"\nsetText(text)\n\nnormal 'c s \"',\n  text: \"\"\"\n  pen pineapple\n  (apple \"pen\")\n  \"\"\"\nnormal 'c s [',\n  text: \"\"\"\n  pen pineapple\n  (apple [pen])\n  \"\"\"\n\nnormal 'c S [ \u003c',\n  text: \"\"\"\n  pen pineapple\n  (apple \u003cpen\u003e)\n  \"\"\"\n\nnormal 'c S ( {',\n  text: \"\"\"\n  pen pineapple\n  {apple \u003cpen\u003e}\n  \"\"\"\n\n# Visual-mode selected-area is | to |\n# -------------------------\ntext = \"\"\"\n  pen pi|neap|ple\n  apple pen\n  \"\"\"\nsetText(text)\n\nvisual 'S {',\n  text: \"\"\"\n  pen pi{neap}ple\n  apple pen\n  \"\"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft9md%2Fatom-vim-mode-plus-keymaps-for-surround","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft9md%2Fatom-vim-mode-plus-keymaps-for-surround","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft9md%2Fatom-vim-mode-plus-keymaps-for-surround/lists"}