{"id":13714411,"url":"https://github.com/lilydjwg/search-and-view","last_synced_at":"2025-04-05T03:30:37.366Z","repository":{"id":18768435,"uuid":"21981294","full_name":"lilydjwg/search-and-view","owner":"lilydjwg","description":"Tools to make searching and viewing easy.","archived":false,"fork":false,"pushed_at":"2023-03-15T06:26:49.000Z","size":207,"stargazers_count":48,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-23T04:46:47.139Z","etag":null,"topics":["ag","editor-helper","ripgrep","search-in-text","searcher","vim"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/lilydjwg.png","metadata":{"files":{"readme":"README.rst","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":"2014-07-18T13:33:44.000Z","updated_at":"2024-08-03T00:06:23.960Z","dependencies_parsed_at":"2024-08-03T00:22:46.279Z","dependency_job_id":null,"html_url":"https://github.com/lilydjwg/search-and-view","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilydjwg%2Fsearch-and-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilydjwg%2Fsearch-and-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilydjwg%2Fsearch-and-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilydjwg%2Fsearch-and-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lilydjwg","download_url":"https://codeload.github.com/lilydjwg/search-and-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284911,"owners_count":20913691,"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":["ag","editor-helper","ripgrep","search-in-text","searcher","vim"],"created_at":"2024-08-02T23:01:58.990Z","updated_at":"2025-04-05T03:30:36.798Z","avatar_url":"https://github.com/lilydjwg.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Tools to make searching and viewing easy.\n\nFor a Chinese introduction, see `my blog article`_.\n\n阅读中文版介绍，请看\\ `我的博客文章`_\\ （有点旧了）。\n\nOverview\n--------\n\n* ``rgg``/``rgv``: `ripgrep`_ wrappers to make it easy to open files as matching places\n* ``vv``: A Vim / gVim wrapper to open files in existing gVim instances and then move the cursor to specified location\n\n.. image:: https://raw.githubusercontent.com/lilydjwg/search-and-view/master/screenshot.png\n\nDependencies\n------------\n\n* Python \u003e= 3.8\n* `ripgrep`_\n* the `setproctitle`_ Python library (optional)\n* ``vv`` requires Vim or gVim with ``+clientserver`` feature\n\nArch Linux users can install ``search-and-view-git`` from AUR (thanks to @acgtyrant).\n\nConfiguration\n-------------\n\nUse the ``RGV_EDITOR`` environmental variable to spefify your preferred editor\nfor ``rgv``. It's taken as a shell command template string and the following is\nrecognized:\n\n* ``$file``: The file path.\n* ``$line``: The line number.\n* ``$col``: The column number.\n\nFor example::\n\n  # uses 'vv'\n  export RGV_EDITOR='vv $file:$line:$col'\n  # uses 'vim'\n  export RGV_EDITOR='vim +$line $file'\n\nUsage\n-----\n\n``rgg`` and ``rgv``\n^^^^^^^^^^^^^^^^^^^\nJust use ``rgg`` as ``rg`` to search text (Searching in filenames ``-g`` won't work).\n\nUse ``rgv N`` to open the result numbered ``N``. You can use ``rgv`` without arguments \nto view the list again. The list is per terminal (tty).\n\nIf your `terminal supports hyperlinks`_, you'll be able to click the\nhighlighted match to jump to it, provided that ``vv.desktop`` is properly\ninstalled (i.e. copied to ``~/.local/share/applications``).\n\n``vv``\n^^^^^^\nyou can give a line number and a column number after a colon, like this::\n\n  vv file:33\n  vv file:12:902\n\nOr paste the line from a Python traceback::\n\n  vv 'File \"/usr/lib/python3.4/sre_parse.py\", line 358, in _parse_sub'\n\nYou don't need the full line. Just enough info will do::\n\n  vv '/usr/lib/python3.4/sre_parse.py\", line 358'\n\nIf you are on Linux and use zsh, I suggest the following alias::\n\n  alias -g XS='\"$(xsel)\"'\n\nThen you can just select the line and do::\n\n  vv XS\n\nYou can pass the ``--wait`` flag to wait for Vim to finish editing the file\n(useful for programs that waits for editing to finish).\n\nUse the ``--vim NAME`` option to spefify a Vim instance (default is the first one found).\n\nLicense\n-------\n\nGPLv3+.\n\n.. _ag: https://github.com/ggreer/the_silver_searcher\n.. _ripgrep: https://github.com/BurntSushi/ripgrep\n.. _setproctitle: https://github.com/dvarrazzo/py-setproctitle\n.. _my blog article:\n.. _我的博客文章: https://blog.lilydjwg.me/2014/7/18/search-and-view-quickly.53141.html\n.. _terminal supports hyperlinks: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilydjwg%2Fsearch-and-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flilydjwg%2Fsearch-and-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilydjwg%2Fsearch-and-view/lists"}