Skip to content

imdevan/page-replace.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

146 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

page-replace.nvim

Minimal Neovim plugin to find and replace text in a buffer or selection using interactive input prompts.

Installation

lazy.nvim

{
  "imdevan/page-replace.nvim",
  opts = {},
}

Configuration

{
  "imdevan/page-replace.nvim",
  opts = {
    keymaps = {
      enabled = true,
    },
  },
}

Keymaps

Key Action
<leader>pr Find and replace text in the page or selection

Set keymaps.enabled = false to disable and define your own mapping:

{
  "imdevan/page-replace.nvim",
  opts = { keymaps = { enabled = false } },
  config = function(_, opts)
    require("page-replace").setup(opts)
    vim.keymap.set({ "n", "x" }, "<leader>pr", "<cmd>PageReplace<cr>")
  end,
}

Commands

Command Description
PageReplace Prompt for find and replace strings to perform substitution

Running tests

Requires plenary.nvim on your runtime path (or a clone in vendor/plenary.nvim).

nvim --headless -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal_init.lua'}"

# or

just test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages