Skip to content

TheLazyCat00/replace-nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Don't use this plugin! I stopped developing it because I found substitute.nvim which is way better.

replace-nvim ๐Ÿ“

replace-nvim is a Neovim plugin that lets you replace parts of your code with the content from your clipboard using text objects. This means that if you bind t to it, you can do tab (t around block) and the content from the + register will be inserted into that section.

replace-nvim.mp4

๐Ÿ› ๏ธ Configuration

replace-nvim has no options and is designed to be used via its functions.

Important

Make sure you set expr to true in the keymap.

Here is an example config:

return {
    "TheLazyCat00/replace-nvim",
    opts = {},
    keys = {
        {
            "t",
            function() return require('replace-nvim').replace(true) end,
            mode = { "n", "x" },
            expr = true, -- โš ๏ธ set expr to true
            desc = "Replace with clipboard",
        },
    },
}

Note

replace() is the only available function.

๐Ÿšง Parameters

replace() has only parameter:

  • writeToReg: Determines whether the removed text should be placed in the + register.

Feel free to open issues or pull requests!

About

Neovim plugin for replacing parts of code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages