{"id":13927083,"url":"https://github.com/christoomey/vim-sort-motion","last_synced_at":"2026-01-28T10:33:25.428Z","repository":{"id":17486394,"uuid":"20268529","full_name":"christoomey/vim-sort-motion","owner":"christoomey","description":"Vim mapping for sorting a range of text","archived":false,"fork":false,"pushed_at":"2021-03-07T21:33:27.000Z","size":11,"stargazers_count":259,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-12T06:09:21.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vim script","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/christoomey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-28T18:48:41.000Z","updated_at":"2025-07-28T14:44:18.000Z","dependencies_parsed_at":"2022-08-04T19:15:56.280Z","dependency_job_id":null,"html_url":"https://github.com/christoomey/vim-sort-motion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/christoomey/vim-sort-motion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoomey%2Fvim-sort-motion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoomey%2Fvim-sort-motion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoomey%2Fvim-sort-motion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoomey%2Fvim-sort-motion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christoomey","download_url":"https://codeload.github.com/christoomey/vim-sort-motion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoomey%2Fvim-sort-motion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-08-07T16:01:23.922Z","updated_at":"2026-01-28T10:33:20.419Z","avatar_url":"https://github.com/christoomey.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"Sort Motion.vim\n===============\n\nThis plugin provides the ability to sort in Vim using text objects and\nmotions. Sorting lines and argument lists manually can be a hassle, and thus\nmost write it off as a waste of effort, but when its as easy as anything else\nin Vim, it becomes a viable option.\n\n`sort-motion` has three different sorting modes:\n\n- Linewise: sort a sequence of lines (require statements, gem lists, etc)\n- Character: sort a comma separated list (argument lists, attribute lists, etc)\n- Visual (linewise or normal): provided for continuity, similar to linewise\n- Block Visual: By default behaves the same as the other visual modes.\n  Optionally, you can provide a specific sort command which you might use to\n  sort by a column (example: `Vissort`)\n\nInstallation\n------------\n\nUsing [Vundle][]:\n\n``` vim\n\" add this line to your ~/.vimrc\nBundle 'christoomey/vim-sort-motion'\n```\n\nthen run `:BundleInstall` from within Vim.\n\n[Vundle]: https://github.com/gmarik/Vundle.vim\n\nUsage\n-----\n\n### Linewise\n\nThe primary interface to this plugin is via the `gs` mapping, for sorting\nbased on a text object or motion. To use the mapping, type `gs` followed by a\nmotion, ie `2j` to sort down two lines.\n\nExamples:\n\n- `gs2j` =\u003e Sort down two lines (current + 2 below)\n- `gsip` =\u003e Sort the current paragraph\n- `gsii` =\u003e Sort the current indentation level (requires [text-obj-indent plugin][])\n\n[text-obj-indent plugin]: https://github.com/kana/vim-textobj-indent\n\n### Character\n\nIn addition, if the text object is within a line then `sort-motion` will\nattempt to sort the text as a comma separated list.\n\nExamples:\n\n`gsi(` =\u003e Sort within parenthesis. `(b, c, a)` would become `(a, b, c)`\n\n### Visual\n\nFor continuity, `sort-motion` also defines a visual mode mapping for `gs`.\nThis behaves as a linewise sort over the lines defined by the visual selection.\n\nYou can also (optionally) specify a blockwise command to use for block\nselections (example: `Vissort`).\n\nConfiguration\n-------------\n\n### sort_motion_flags\n\nIf you'd like to pass any options to `sort`\nyou can set `g:sort_motion_flags`. For example you could use:\n\n```vim\nlet g:sort_motion_flags = 'ui'\n```\n\nTo make all sorts case insensitive and remove duplicates.\n\n*Note*: this only applies to linewise sorting (including visual), but does\nnot apply to the character based sorting of comma separated lists.\n\n### sort_motion_visual_block_command\n\nIf you'd like to specify a specific command to use for blockwise selections you\ncan set it here. This is useful if for example you want to use `Vissort` so that\nyou can sort by a column.\n\n```vim\nlet g:sort_motion_visual_block_command = 'Vissort'\n```\n\nBy default the command used is `sort`.\n\nNOTE: To use `Vissort` you will need to install this plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoomey%2Fvim-sort-motion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristoomey%2Fvim-sort-motion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoomey%2Fvim-sort-motion/lists"}