{"id":16406465,"url":"https://github.com/wincent/vcs-jump","last_synced_at":"2025-06-27T17:32:46.475Z","repository":{"id":48840285,"uuid":"189861529","full_name":"wincent/vcs-jump","owner":"wincent","description":"🤾🏻‍♀️ Jump to interesting places with a Git or Mercurial repo","archived":false,"fork":false,"pushed_at":"2024-10-09T17:00:49.000Z","size":75,"stargazers_count":29,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-05T15:43:34.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wincent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2019-06-02T15:12:25.000Z","updated_at":"2024-10-15T20:24:14.000Z","dependencies_parsed_at":"2022-08-24T22:41:03.592Z","dependency_job_id":"699a756d-4283-45b7-8b94-de41fd39d18b","html_url":"https://github.com/wincent/vcs-jump","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/wincent%2Fvcs-jump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Fvcs-jump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Fvcs-jump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Fvcs-jump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wincent","download_url":"https://codeload.github.com/wincent/vcs-jump/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240380379,"owners_count":19792286,"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":[],"created_at":"2024-10-11T06:09:51.957Z","updated_at":"2025-02-23T21:22:51.722Z","avatar_url":"https://github.com/wincent.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/wincent/vcs-jump/media/logo.png\" /\u003e\n\u003c/p\u003e\n\n# vcs-jump\u003ca name=\"vcs-jump-vcs-jump\" href=\"#user-content-vcs-jump-vcs-jump\"\u003e\u003c/a\u003e\n\n## Intro\u003ca name=\"vcs-jump-intro\" href=\"#user-content-vcs-jump-intro\"\u003e\u003c/a\u003e\n\nThis plug-in allows you to jump to useful places within a Git or Mercurial repository: diff hunks, merge conflicts, and \u0026quot;grep\u0026quot; results.\n\nThe actual work is done by the included `vcs-jump` script, which is a Ruby port of the \u0026quot;git-jump\u0026quot; (shell) script from official Git repo, adapted to work transparently with either Git or Mercurial:\n\nhttps://git.kernel.org/pub/scm/git/git.git/tree/contrib/git-jump\n\n## Requirements\u003ca name=\"vcs-jump-requirements\" href=\"#user-content-vcs-jump-requirements\"\u003e\u003c/a\u003e\n\n- A Ruby interpreter must be available on the host system: the `vcs-jump` script uses a \u0026quot;shebang\u0026quot; line of \u0026quot;/usr/bin/env ruby\u0026quot;.\n\n## Installation\u003ca name=\"vcs-jump-installation\" href=\"#user-content-vcs-jump-installation\"\u003e\u003c/a\u003e\n\nTo install vcs-jump, use your plug-in management system of choice.\n\nvcs-jump consists of a Vim plug-in that provides a \u003cstrong\u003e[`:VcsJump`](#user-content-vcsjump)\u003c/strong\u003e command which invokes a bundled `vcs-jump` executable. The executable itself is useful outside of Vim, so you may wish to add the plug-in's `bin` directory to your `$PATH`; for example, if you installed the plug-in inside `~/.vim/pack/bundle/vcs-jump`, you could add the following to your shell's startup file:\n\n```\nexport PATH=$PATH:~/.vim/pack/bundle/vcs-jump/bin\n```\n\nSee \u003cstrong\u003e[`vcs-jump-usage`](#user-content-vcs-jump-usage)\u003c/strong\u003e for a description of usage from the command-line.\n\n## Usage\u003ca name=\"vcs-jump-usage\" href=\"#user-content-vcs-jump-usage\"\u003e\u003c/a\u003e\n\nvcs-jump can be used from inside or outside of Vim. Inside Vim, run \u003cstrong\u003e[`:VcsJump`](#user-content-vcsjump)\u003c/strong\u003e to populate the \u003cstrong\u003e`quickfix`\u003c/strong\u003e list with \u0026quot;interesting\u0026quot; locations (diff hunks, merge conflicts, or grep results).\n\nOutside of Vim, provided you have set up your `$PATH` as described in \u003cstrong\u003e[`vcs-jump-installation`](#user-content-vcs-jump-installation)\u003c/strong\u003e, you can run the bundled `vcs-jump` executable in any of the following ways to open Vim and immediately populate the \u003cstrong\u003e`quickfix`\u003c/strong\u003e list:\n\n```\nvcs-jump diff # find hunks with diffs relative to current HEAD\nvcs-jump diff HEAD~10 # find hunks with diffs relative to specified commit\nvcs-jump grep stuff # find grep results for \"stuff\"\nvcs-jump merge # find merge conflicts\n```\n\nYou can also add `vcs-jump` as a Git subcommand that can be invoked as `git jump`:\n\n```\ngit jump diff # find hunks with diffs relative to current HEAD\ngit jump diff HEAD~10 # find hunks with diffs relative to specified commit\ngit jump grep stuff # find grep results for \"stuff\"\ngit jump merge # find merge conflicts\n```\n\nTo do this, use one of the following three methods.\n\nFirstly, you can add a `git-jump` file to your `$PATH` with these contents, and then mark it as executable with `chmod +x`:\n\n```\n #!/bin/sh\n\n vcs-jump \"$@\"\n```\n\nSecondly, you can add a symbolic link to the vcs-jump executable anywhere in your path:\n\n```\ncd ~/bin\nln -s path/to/vcs-jump git-jump\n```\n\nThirdly, you can create a Git alias:\n\n```\ngit config --global alias.jump '!f() { vcs-jump \"$@\"; }; f'\n```\n\nBy default, vcs-jump will print usage information if called without any arguments. A useful enhancement to the above alias is to teach `git jump` to pick a reasonable default action instead. The following runs `git jump merge` if there are conflicts, and `git jump diff` if there are modifications, otherwise falling back to the standard behavior:\n\n```\ngit config --global alias.jump '!f() {\n  if [ \"$#\" -eq 0 ]; then\n    if [ -n \"$(git diff --name-only --diff-filter=U)\" ]; then\n      vcs-jump merge;\n    elif ! git diff --quiet; then\n      vcs-jump diff;\n    else\n      vcs-jump;\n    fi;\n  else\n    vcs-jump \"$@\";\n  fi;\n}; f'\n```\n\n## Commands\u003ca name=\"vcs-jump-commands\" href=\"#user-content-vcs-jump-commands\"\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\u003ca name=\"vcsjump\" href=\"#user-content-vcsjump\"\u003e\u003ccode\u003e:VcsJump\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:VcsJump`\u003ca name=\"vcs-jump-vcsjump\" href=\"#user-content-vcs-jump-vcsjump\"\u003e\u003c/a\u003e\n\nThis command invokes the bundled `vcs-jump` script to get the list of \u0026quot;interesting\u0026quot; locations (diff hunks, merge conflicts, or grep results) in the repo, and put them in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e list.\n\nFilename completion is available in the context of this command.\n\nSubcommands are:\n\n- \u0026quot;diff\u0026quot;: Results are diff hunks. Arguments are passed on to the Mercurial or Git `diff` invocation. This means that in the absence of any arguments, a diff against the current \u0026quot;HEAD\u0026quot; will be performed, but you can change that by passing options (eg. `--cached`) or specifying a target revision to compare against.\n- \u0026quot;merge\u0026quot;: Results are merge conflicts. Arguments are ignored.\n- \u0026quot;grep\u0026quot;: Results are grep hits. Arguments are given to the underlying Git or Mercurial `grep` command.\n\nWhen called with a trailing \u003cstrong\u003e`:command-bang`\u003c/strong\u003e (eg. `:VcsJump!`) the current value of the \u003cstrong\u003e[`g:VcsJumpMode`](#user-content-gvcsjumpmode)\u003c/strong\u003e setting is inverted for the duration of that invocation.\n\n## Mappings\u003ca name=\"vcs-jump-mappings\" href=\"#user-content-vcs-jump-mappings\"\u003e\u003c/a\u003e\n\n### `\u003cPlug\u003e(VcsJump)`\u003ca name=\"vcs-jump-plugvcsjump\" href=\"#user-content-vcs-jump-plugvcsjump\"\u003e\u003c/a\u003e\n\nThis mapping invokes the bundled `vcs-jump` script, defaulting to \u0026quot;diff\u0026quot; mode.\n\nBy default, `\u003cLeader\u003ed` will invoke this mapping unless:\n\n- A mapping with the same \u003cstrong\u003e`{lhs}`\u003c/strong\u003e already exists; or:\n- An alternative mapping to \u003cstrong\u003e[`\u003cPlug\u003e(VcsJump)`](#user-content-plugvcsjump)\u003c/strong\u003e has already been defined in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e.\n\nYou can create a different mapping like this:\n\n```\n\" Use \u003cLeader\u003eg instead of \u003cLeader\u003ed\nnmap \u003cLeader\u003eg \u003cPlug\u003e(VcsJump)\n```\n\n## Options\u003ca name=\"vcs-jump-options\" href=\"#user-content-vcs-jump-options\"\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gvcsjumpmode\" href=\"#user-content-gvcsjumpmode\"\u003e\u003ccode\u003eg:VcsJumpMode\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:VcsJumpMode` (string, default: \"cwd\")\u003ca name=\"vcs-jump-gvcsjumpmode-string-default-cwd\" href=\"#user-content-vcs-jump-gvcsjumpmode-string-default-cwd\"\u003e\u003c/a\u003e\n\nControls whether vcs-jump should operate relative to Vim's current working directory (when \u003cstrong\u003e[`g:VcsJumpMode`](#user-content-gvcsjumpmode)\u003c/strong\u003e is \u0026quot;cwd\u0026quot;, the default) or to the current buffer (when \u003cstrong\u003e[`g:VcsJumpMode`](#user-content-gvcsjumpmode)\u003c/strong\u003e is \u0026quot;buffer\u0026quot;).\n\nTo override the default, add this to your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e:\n\n```\nlet g:VcsJumpMode=\"buffer\"\n```\n\nNote that you can temporarily invert the sense of this setting by running \u003cstrong\u003e[`:VcsJump`](#user-content-vcsjump)\u003c/strong\u003e with a trailing \u003cstrong\u003e`:command-bang`\u003c/strong\u003e (eg. `:VcsJump!`).\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gvcsjumploaded\" href=\"#user-content-gvcsjumploaded\"\u003e\u003ccode\u003eg:VcsJumpLoaded\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:VcsJumpLoaded` (any, default: none)\u003ca name=\"vcs-jump-gvcsjumploaded-any-default-none\" href=\"#user-content-vcs-jump-gvcsjumploaded-any-default-none\"\u003e\u003c/a\u003e\n\nTo prevent vcs-jump from being loaded, set \u003cstrong\u003e[`g:VcsJumpLoaded`](#user-content-gvcsjumploaded)\u003c/strong\u003e to any value in your \u0026quot; \u003cstrong\u003e`.vimrc`\u003c/strong\u003e. For example:\n\n```\nlet g:VcsJumpLoaded=1\n```\n\n## Website\u003ca name=\"vcs-jump-website\" href=\"#user-content-vcs-jump-website\"\u003e\u003c/a\u003e\n\nSource code:\n\nhttps://github.com/wincent/vcs-jump\n\nOfficial releases are listed at:\n\nhttp://www.vim.org/scripts/script.php?script_id=5790\n\n## License\u003ca name=\"vcs-jump-license\" href=\"#user-content-vcs-jump-license\"\u003e\u003c/a\u003e\n\nCopyright 2014-present Greg Hurrell. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \u0026quot;AS IS\u0026quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n## Development\u003ca name=\"vcs-jump-development\" href=\"#user-content-vcs-jump-development\"\u003e\u003c/a\u003e\n\n### Contributing patches\u003ca name=\"vcs-jump-contributing-patches\" href=\"#user-content-vcs-jump-contributing-patches\"\u003e\u003c/a\u003e\n\nPatches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/vcs-jump/pulls\n\n### Cutting a new release\u003ca name=\"vcs-jump-cutting-a-new-release\" href=\"#user-content-vcs-jump-cutting-a-new-release\"\u003e\u003c/a\u003e\n\nAt the moment the release process is manual:\n\n- Perform final sanity checks and manual testing\n- Update the \u003cstrong\u003e[`vcs-jump-history`](#user-content-vcs-jump-history)\u003c/strong\u003e section of the documentation\n- Verify clean work tree:\n\n```\ngit status\n```\n\n- Tag the release:\n\n```\ngit tag -s -m \"$VERSION release\" $VERSION\n```\n\n- Publish the code:\n\n```\ngit push origin main --follow-tags\ngit push github main --follow-tags\n```\n\n- Produce the release archive:\n\n```\ngit archive -o vcs-jump-$VERSION.zip HEAD -- .\n```\n\n- Upload to http://www.vim.org/scripts/script.php?script_id=5790\n\n## Authors\u003ca name=\"vcs-jump-authors\" href=\"#user-content-vcs-jump-authors\"\u003e\u003c/a\u003e\n\nvcs-jump is written and maintained by Greg Hurrell \u0026lt;greg@hurrell.net\u0026gt;.\n\nOther contributors that have submitted patches include (in alphabetical order):\n\n- Aaron Schrab\n- Adam P. Regasz-Rethy\n- Pascal Lalancette\n\nThis list produced with:\n\n```\n:read !git shortlog -s HEAD | grep -v 'Greg Hurrell' | cut -f 2-3 | sed -e 's/^/- /'\n```\n\n## History\u003ca name=\"vcs-jump-history\" href=\"#user-content-vcs-jump-history\"\u003e\u003c/a\u003e\n\n### main (not yet released)\u003ca name=\"vcs-jump-main-not-yet-released\" href=\"#user-content-vcs-jump-main-not-yet-released\"\u003e\u003c/a\u003e\n\n- Pass `diff.mnemonicPrefix=no` and `diff.noprefix=no` to Git to ensure `diff` output has the necessary prefixes for parsing (patches from Aaron Schrab: https://github.com/wincent/vcs-jump/pull/7; and Adam P. Regasz-Rethy: https://github.com/wincent/vcs-jump/pull/9).\n- fix: don't clobber 'cpoptions' (patch from Adam P. Regasz-Rethy: https://github.com/wincent/vcs-jump/pull/10).\n- fix: don't allow local 'errorformat' to interfere with operation.\n\n### 1.0 (12 October 2019)\u003ca name=\"vcs-jump-10-12-october-2019\" href=\"#user-content-vcs-jump-10-12-october-2019\"\u003e\u003c/a\u003e\n\n- Provide a meaningful title for the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing.\n- Run `git diff` with `--no-color` to prevent a `git config color.ui` setting of \u0026quot;always\u0026quot; from breaking diff mode (https://github.com/wincent/vcs-jump/issues/1)\n- Add \u003cstrong\u003e[`g:VcsJumpMode`](#user-content-gvcsjumpmode)\u003c/strong\u003e and teach \u003cstrong\u003e[`:VcsJump`](#user-content-vcsjump)\u003c/strong\u003e to accept a \u003cstrong\u003e`:command-bang`\u003c/strong\u003e suffix that can be used to make vcs-jump operate relative to the current buffer instead of the current working directory (patch from Pascal Lalancette, https://github.com/wincent/vcs-jump/pull/5).\n\n### 0.1 (2 June 2019)\u003ca name=\"vcs-jump-01-2-june-2019\" href=\"#user-content-vcs-jump-01-2-june-2019\"\u003e\u003c/a\u003e\n\n- Initial release: originally extracted from my dotfiles in https://wincent.dev/n/vcs-jump-origin and then iterated on before extracting into a standalone Vim plug-in.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwincent%2Fvcs-jump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwincent%2Fvcs-jump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwincent%2Fvcs-jump/lists"}