{"id":13837150,"url":"https://github.com/emacsfodder/move-text","last_synced_at":"2026-02-14T06:34:41.658Z","repository":{"id":56654949,"uuid":"51563439","full_name":"emacsfodder/move-text","owner":"emacsfodder","description":"move current line or region up or down","archived":false,"fork":false,"pushed_at":"2023-12-04T15:14:19.000Z","size":1344,"stargazers_count":177,"open_issues_count":2,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-02-16T08:34:15.615Z","etag":null,"topics":["emacs","emacs-lisp","text-manipulation"],"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/emacsfodder.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":"2016-02-12T02:46:24.000Z","updated_at":"2024-05-30T01:30:16.220Z","dependencies_parsed_at":"2024-05-30T01:30:05.024Z","dependency_job_id":null,"html_url":"https://github.com/emacsfodder/move-text","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/emacsfodder/move-text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacsfodder%2Fmove-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacsfodder%2Fmove-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacsfodder%2Fmove-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacsfodder%2Fmove-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emacsfodder","download_url":"https://codeload.github.com/emacsfodder/move-text/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacsfodder%2Fmove-text/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264608131,"owners_count":23636683,"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","emacs-lisp","text-manipulation"],"created_at":"2024-08-04T15:01:02.050Z","updated_at":"2026-02-14T06:34:41.632Z","avatar_url":"https://github.com/emacsfodder.png","language":"Emacs Lisp","funding_links":["https://ko-fi.com/F1F714HTLD'"],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"\u003e Hi all, Please consider donating to this or any of my many of opensource projects.\n\u003e \n\u003e \u003ca href='https://ko-fi.com/F1F714HTLD' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\n[![Move-Text CI Tests](https://github.com/emacsfodder/move-text/actions/workflows/test.yml/badge.svg)](https://github.com/emacsfodder/move-text/actions/workflows/test.yml)\n[![MELPA](https://melpa.org/packages/move-text-badge.svg)](https://melpa.org/#/move-text)\n[![MELPA Stable](https://stable.melpa.org/packages/move-text-badge.svg)](https://stable.melpa.org/#/move-text)\n\n# Move Text\n\nMoveText \nallows you to move the current line using M-up / M-down (or any other bindings you choose)\nif a region is marked, it will move the region instead.\n\nUsing the prefix arg (C-u *number* or META *number*) will predetermine how many lines to move.\n\nInstall from MELPA (or MELPA stable)\n\n```\nM-x package-install move-text \u003cRETURN\u003e\n```\n\nIf you want to use the default bindings, add the following to .emacs\nanywhere after `(package-initialize)`:\n\n```\n(move-text-default-bindings)\n```\nThis sets the keyboard shortcuts:\n\n-  \u003ckbd\u003eMeta\u003c/kbd\u003e-\u003ckbd\u003eup\u003c/kbd\u003e `move-text-up` (line or active region)\n-  \u003ckbd\u003eMeta\u003c/kbd\u003e-\u003ckbd\u003edown\u003c/kbd\u003e `move-text-down` (line or active region)\n\n## Demonstration\n\n![](move-text.gif)\n\n### Indent after moving...\n\n[@jbreeden](https://github.com/jbreeden) gave us this useful function advice to have Emacs re-indent the text in-and-around a text move.\n\n```lisp\n(defun indent-region-advice (\u0026rest ignored)\n  (let ((deactivate deactivate-mark))\n    (if (region-active-p)\n        (indent-region (region-beginning) (region-end))\n      (indent-region (line-beginning-position) (line-end-position)))\n    (setq deactivate-mark deactivate)))\n\n(advice-add 'move-text-up :after 'indent-region-advice)\n(advice-add 'move-text-down :after 'indent-region-advice)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femacsfodder%2Fmove-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femacsfodder%2Fmove-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femacsfodder%2Fmove-text/lists"}