{"id":13862827,"url":"https://github.com/nivekuil/corral","last_synced_at":"2025-04-14T00:51:18.226Z","repository":{"id":32198286,"uuid":"35771905","full_name":"nivekuil/corral","owner":"nivekuil","description":"Quickly surround text with delimiters in emacs","archived":false,"fork":false,"pushed_at":"2021-10-12T19:34:04.000Z","size":16857,"stargazers_count":94,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T14:55:10.521Z","etag":null,"topics":["emacs","productivity"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","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/nivekuil.png","metadata":{"files":{"readme":"README.org","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-05-17T15:44:16.000Z","updated_at":"2025-03-03T10:06:18.000Z","dependencies_parsed_at":"2022-09-19T11:02:36.180Z","dependency_job_id":null,"html_url":"https://github.com/nivekuil/corral","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Fcorral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Fcorral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Fcorral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Fcorral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nivekuil","download_url":"https://codeload.github.com/nivekuil/corral/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804773,"owners_count":21164131,"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":["emacs","productivity"],"created_at":"2024-08-05T06:01:53.478Z","updated_at":"2025-04-14T00:51:18.189Z","avatar_url":"https://github.com/nivekuil.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"[[http://melpa.org/#/corral][file:http://melpa.org/packages/corral-badge.svg]]\n[[http://stable.melpa.org/#/corral][file:http://stable.melpa.org/packages/corral-badge.svg]]\n* Corral\nCorral is a lightweight package that lets you quickly wrap parentheses and other delimiters around text, intuitively surrounding what you want it to using just two commands.\n\n** Examples\n[[./corral-example-c.gif]]\n[[./corral-example-js.gif]] \n[[./corral-example-el.gif]]\n\n\nThese examples are shown with the built-in =electric-pair-mode= enabled.\n\n** Installation\nCorral can be found on melpa, and should be installed from there.  To install it manually instead, save corral.el to your computer and add this to your init file:\n#+BEGIN_SRC emacs-lisp\n(add-to-list 'load-path \"/path/to/corral/directory/\")\n(require 'corral)\n#+END_SRC\n\n** Usage\nCall a command once to wrap delimiters around the sexp at point.  Repeated calls of the same command, backward or forward, will shift the delimiters in the respective direction, corralling more text.\n\nTo use these commands, just bind them to keys of your choosing.  Here are some example keybindings:\n#+BEGIN_SRC emacs-lisp\n(global-set-key (kbd \"M-9\") 'corral-parentheses-backward)\n(global-set-key (kbd \"M-0\") 'corral-parentheses-forward)\n(global-set-key (kbd \"M-[\") 'corral-brackets-backward)\n(global-set-key (kbd \"M-]\") 'corral-brackets-forward)\n(global-set-key (kbd \"M-{\") 'corral-braces-backward)\n(global-set-key (kbd \"M-}\") 'corral-braces-forward)\n(global-set-key (kbd \"M-\\\"\") 'corral-double-quotes-backward)\n#+END_SRC\n\nThe wrapping algorithm tries to follow these rules:\n- If the point is over a word, it will always wrap around that word.\n- Otherwise, =backward= and =forward= commands should have different effects.\n\nYou can tweak how the wrapping works by modifying the syntax table through =corral-syntax-entries= (see [[https://github.com/nivekuil/corral#configure-how-corral-handles-punctuationsymbols][Settings]]).\n\n** Settings\n*** Keep point position instead of following delimiters\nThis is controlled by the variable =corral-preserve-point=, which can be set manually or through customize.\n#+BEGIN_SRC emacs-lisp\n(setq corral-preserve-point t)\n#+END_SRC\n*** Configure how corral handles punctuation/symbols\nCorral can be configured to use special syntax rules, which are set through the variable =corral-syntax-entries=. This variable is a list of syntax entries and follows the same syntax as =modify-syntax-entry=.\n\nFor example, if you want to have =#= and =*= be treated as symbols so that they are wrapped as part of the word:\n#+BEGIN_SRC emacs-lisp\n(setq corral-syntax-entries '((?# \"_\")\n                              (?* \"_\")))\n#+END_SRC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivekuil%2Fcorral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnivekuil%2Fcorral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivekuil%2Fcorral/lists"}