{"id":13411041,"url":"https://github.com/s1n7ax/nvim-search-and-replace","last_synced_at":"2026-03-09T18:35:30.972Z","repository":{"id":49332945,"uuid":"401965450","full_name":"s1n7ax/nvim-search-and-replace","owner":"s1n7ax","description":"Really simple plugin to search and replace multiple files","archived":false,"fork":false,"pushed_at":"2022-09-06T10:22:37.000Z","size":13,"stargazers_count":73,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-11T12:42:04.781Z","etag":null,"topics":["neovim","neovim-plugin","search-and-replace"],"latest_commit_sha":null,"homepage":"","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/s1n7ax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-01T07:07:29.000Z","updated_at":"2025-01-03T09:15:09.000Z","dependencies_parsed_at":"2023-01-17T21:10:50.128Z","dependency_job_id":null,"html_url":"https://github.com/s1n7ax/nvim-search-and-replace","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/s1n7ax%2Fnvim-search-and-replace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1n7ax%2Fnvim-search-and-replace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1n7ax%2Fnvim-search-and-replace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1n7ax%2Fnvim-search-and-replace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s1n7ax","download_url":"https://codeload.github.com/s1n7ax/nvim-search-and-replace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610699,"owners_count":20319012,"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":["neovim","neovim-plugin","search-and-replace"],"created_at":"2024-07-30T20:01:11.024Z","updated_at":"2025-09-28T20:32:09.966Z","avatar_url":"https://github.com/s1n7ax.png","language":"Lua","funding_links":[],"categories":["Search","Lua"],"sub_categories":["Markdown and LaTeX","Assembly"],"readme":"# nvim-search-and-replace\n\nAbsolutly minimal plugin to search and replace multiple files in current working directory. This only uses `vim` built-in features to search and replace\n\n## Install\n\n```lua\nuse {\n    's1n7ax/nvim-search-and-replace',\n    config = function() require'nvim-search-and-replace'.setup() end,\n}\n```\n\n## Keymaps\n\n\u003ckbd\u003eleader\u003c/kbd\u003e + \u003ckbd\u003eg\u003c/kbd\u003e + \u003ckbd\u003er\u003c/kbd\u003e = Search and replace (Respects\nignored files)\n\n\u003ckbd\u003eleader\u003c/kbd\u003e + \u003ckbd\u003eg\u003c/kbd\u003e + \u003ckbd\u003eR\u003c/kbd\u003e = Search and replace\neverything (Don't give a shit about the ignored files)\n\n\u003ckbd\u003eleader\u003c/kbd\u003e + \u003ckbd\u003eg\u003c/kbd\u003e + \u003ckbd\u003eu\u003c/kbd\u003e = Search, replace and save (Respects\nignored files)\n\n\u003ckbd\u003eleader\u003c/kbd\u003e + \u003ckbd\u003eg\u003c/kbd\u003e + \u003ckbd\u003eU\u003c/kbd\u003e = Search, replace and save\neverything (Don't give a shit about the ignored files)\n\n## Commands\n\n```vim\n:SReplace               - Search and replace\n:SReplaceAll            - Search and replace all including ignored files\n:SReplaceAndSave        - Search, replace and save\n:SReplaceAllAndSave     - Search, replace and save including ignored files\n```\n\n## Syntax\n\n### Search Query Syntax\n\n`:h su` for more information\n\n```\n/\u003csubstitute-pattern\u003e/\u003csubstitute-flags\u003e \u003cfiles\u003e\n/\u003csubstitute-pattern\u003e/\u003csubstitute-flags\u003e\n\u003csubstitute-pattern\u003e/\u003csubstitute-flags\u003e\n/\u003csubstitute-pattern\u003e/\n\u003csubstitute-pattern\u003e\n```\n\nEx:-\n\n```lua\n-- search the word \"test\" in \".js\" files and replace them glabally in every file\n/test/g **/*.js\n\n-- search the word \"test\" in all files and replace them glabally in every file\ntest/g\n\n-- search the word \"test\" in all files and replace one time for single line\ntest\n\n-- seach any word starts with \"te\" and ends with \"st\" and replace one time for single line\nte.*st\n\n-- seach \"print(something)\" and add something to match group\nprint(\\(.*\\))\n```\n\n### Replace Query Syntax\n\n```\n\u003creplace-query\u003e\n```\n\nEx:-\n\n```\n-- replace the matched queries with \"test\"\ntest\n\n-- replace the matched queries with \"console.log\" and replace \\1 with the first\nmatch value\nconsole.log(\\1)\n```\n\n## Configurations\n\n```lua\nrequire('nvim-search-and-replace').setup{\n    -- file patters to ignore\n    ignore = {'**/node_modules/**', '**/.git/**',  '**/.gitignore', '**/.gitmodules','build/**'},\n\n    -- save the changes after replace\n    update_changes = false,\n\n    -- keymap for search and replace\n    replace_keymap = '\u003cleader\u003egr',\n\n    -- keymap for search and replace ( this does not care about ignored files )\n    replace_all_keymap = '\u003cleader\u003egR',\n\n    -- keymap for search and replace\n    replace_and_save_keymap = '\u003cleader\u003egu',\n\n    -- keymap for search and replace ( this does not care about ignored files )\n    replace_all_and_save_keymap = '\u003cleader\u003egU',\n}\n```\n\n## Available functions\n\n```lua\nrequire('nvim-global-replace').setup(config)\n\n-- require('nvim-global-replace').search_and_replace({\n--      ignore = { 'tests/**'} , update_changes = true\n-- })\nrequire('nvim-global-replace').replace(opts)\n\n-- require('nvim-global-replace').search_and_replace({\n--      update_changes = true\n-- })\nrequire('nvim-global-replace').replace_all(opts)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1n7ax%2Fnvim-search-and-replace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs1n7ax%2Fnvim-search-and-replace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1n7ax%2Fnvim-search-and-replace/lists"}