{"id":50731378,"url":"https://github.com/beixiyo/vv-replace.nvim","last_synced_at":"2026-06-10T09:01:16.793Z","repository":{"id":353982266,"uuid":"1220666900","full_name":"beixiyo/vv-replace.nvim","owner":"beixiyo","description":"VSCode-style search \u0026 replace powered by ripgrep. VSCode 风搜索替换（基于 ripgrep）","archived":false,"fork":false,"pushed_at":"2026-05-31T11:38:45.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T13:14:59.756Z","etag":null,"topics":["lua","neovim","neovim-plugin","nvim","nvim-plugin","replace","ripgrep","search"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/beixiyo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-25T07:05:14.000Z","updated_at":"2026-05-31T11:38:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/beixiyo/vv-replace.nvim","commit_stats":null,"previous_names":["beixiyo/vv-replace.nvim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beixiyo/vv-replace.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-replace.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-replace.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-replace.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-replace.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beixiyo","download_url":"https://codeload.github.com/beixiyo/vv-replace.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-replace.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34144680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["lua","neovim","neovim-plugin","nvim","nvim-plugin","replace","ripgrep","search"],"created_at":"2026-06-10T09:01:15.287Z","updated_at":"2026-06-10T09:01:16.736Z","avatar_url":"https://github.com/beixiyo.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003evv-replace.nvim\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eVSCode 风的搜索替换面板 — 默认纯文本、smart-case、diff 预览\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Neovim-0.10+-57A143?style=flat-square\u0026logo=neovim\u0026logoColor=white\" alt=\"Requires Neovim 0.10+\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Lua-2C2D72?style=flat-square\u0026logo=lua\u0026logoColor=white\" alt=\"Lua\" /\u003e\n  \u003ca href=\"https://github.com/BurntSushi/ripgrep\"\u003e\u003cimg src=\"https://img.shields.io/badge/ripgrep_%E2%89%A513-required-orange?style=flat-square\" alt=\"Requires ripgrep ≥13\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 依赖\n\n| 依赖 | 说明 |\n|------|------|\n| [Neovim ≥ 0.10](https://github.com/neovim/neovim) | `vim.system`、extmark `invalid`、`vim.fs.normalize` |\n| [ripgrep ≥ 13](https://github.com/BurntSushi/ripgrep) | 搜索引擎，使用 `--json` 流式输出 + `--replace` 计算替换结果 |\n| [vv-utils.nvim](https://github.com/beixiyo/vv-utils.nvim) | 共享工具库（fs、help_panel、ui_window） |\n\n## 为什么要这个插件\n\n[grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim) 日常使用有几处不顺手：\n\n| | grug-far | vv-replace |\n|---|---|---|\n| **默认模式** | 正则 — 输入 `foo(` 或 `a.b` 需手动转义 | 纯文本（plainText），`\u003cS-Tab\u003e` 切正则 |\n| **大小写** | 手敲 `-s`/`-i` 到 Flags 框 | smart-case：全小写自动 `-i`，含大写自动 `-s` |\n| **输入框** | 5 个（Search/Replace/Flags/Files/Paths） | 文件模式 2 个，项目模式 5 个 |\n| **替换预览** | 实时 diff | 单行 inline diff（匹配标红 + 替换绿色）；光标移动时自动在源窗口预览整个文件的 diff |\n\n## 安装\n\n```lua\n{\n  'beixiyo/vv-replace.nvim',\n  dependencies = { 'beixiyo/vv-utils.nvim' },\n  cmd = { 'VVReplace', 'VVReplaceFile', 'VVReplaceClose', 'VVReplaceToggle' },\n  keys = { '\u003cleader\u003esR', '\u003cleader\u003esr' },\n  ---@type VVReplaceConfig\n  opts = {\n    position = 'right',            -- 'left' | 'right'\n    width = 60,                    -- 面板宽度\n    debounce_ms = 200,             -- 输入去抖延迟\n    max_results = 10000,           -- 单次搜索匹配上限\n    context_lines = 0,             -- rg --context=N（0 关闭）\n    default_mode = 'plainText',    -- 'plainText' | 'regex'\n    rg_extra_args = {},            -- 追加给 rg 的额外参数\n    keymaps = {\n      next_input  = '\u003cTab\u003e',       -- 下一个输入框\n      toggle_mode = '\u003cS-Tab\u003e',     -- 切换模式 plainText ↔ regex\n      replace_all = '\u003clocalleader\u003er', -- 替换全部（带确认）\n      goto_match  = '\u003cCR\u003e',        -- 跳转到源文件对应行\n      close       = 'q',\n      help        = 'g?',\n    },\n    icons = {\n      plain       = '󰊄',           -- mode 徽章: plainText\n      regex       = '',           -- mode 徽章: regex\n      next_input  = '󰁔',\n      toggle_mode = '󰁨',\n      goto_match  = '',\n      replace_all = '',\n      close       = '',\n      help        = '󰌌',\n      title       = '',\n    },\n  },\n}\n```\n\n## 配置\n\n| 选项 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| `position` | `'left' \\| 'right'` | `'right'` | 面板位置 |\n| `width` | `integer` | `60` | 面板宽度 |\n| `debounce_ms` | `integer` | `200` | 输入去抖延迟（ms） |\n| `max_results` | `integer` | `10000` | 单次搜索匹配上限，防大项目卡死 |\n| `context_lines` | `integer` | `0` | `rg --context=N`，0 = 关闭 |\n| `default_mode` | `'plainText' \\| 'regex'` | `'plainText'` | 默认搜索模式 |\n| `rg_extra_args` | `string[]` | `{}` | 追加给所有 rg 调用的额外参数（如 `{ '--hidden' }`） |\n| `keymaps` | `VVReplaceKeymaps` | *见上方* | 面板内键位，可逐项覆盖 |\n| `icons` | `VVReplaceIcons` | *见上方* | NerdFont 图标；非 NerdFont 用户可改 ASCII |\n\n### 入口键位\n\n| 键 | 作用 |\n|----|------|\n| `\u003cleader\u003esR` | 项目级搜索替换（5 字段：Search / Replace / Include / Exclude / Cwd） |\n| `\u003cleader\u003esr` | 当前文件搜索替换（2 字段：Search / Replace） |\n| `\u003cleader\u003esR`（visual） | 用选区预填 Search |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeixiyo%2Fvv-replace.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeixiyo%2Fvv-replace.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeixiyo%2Fvv-replace.nvim/lists"}