/yanker.nvim

Neovim plugin for keeping a yank history

Primary LanguageLuaMIT LicenseMIT

Yanker

GitHub tag (latest by date) License

Neovim plugin for remembering your yanks.

  1. Demo
  2. Requirements
  3. Installation
  4. License

Demo

In this demo I am yanking in different modes. I'm also yanking the same item multiple time; This plugin will de-duplicate them. With <leader>yh you can choose one of the yanked items in the history and paste.

yanker

Requirements

This library supports Neovim v0.7.0 or newer.

This plugin depends are the following libraries. Please make sure to add them as dependencies in your package manager:

Installation

Use your favourite package manager to install this library.

Lazy

{
	"arsham/yanker.nvim",
  dependencies = { "arsham/arshlib.nvim", "junegunn/fzf.vim" },
  config = true,
  -- or to provide configurations
  -- config = { history = "<leader>yh" },
}

Packer

use({
  "arsham/yanker.nvim",
  config = function()
    require("yanker").config({})
  end,
  requires = { "arsham/arshlib.nvim", "junegunn/fzf.vim" },
})

Config

By default this pluging uses <leader>yh for key mapping, However you can change it to your liking. For example:

require("yanker").config({
  history = "<leader>yh",
})

Lazy Loading

You can let your package manager to load this plugin when a key-mapping events is fired or a buffer is opened.

Packer example:

use({
  "arsham/yanker.nvim",
  config = function()
    require("yanker").config({})
  end,
  requires = { "arsham/arshlib.nvim", "junegunn/fzf.vim" },
  event = { "BufRead", "BufNewFile" },
  keys = { "<leader>yh" },
})

Lazy example:

{
  "arsham/yanker.nvim",
  dependencies = { "arsham/arshlib.nvim", "junegunn/fzf.vim" },
  config = true,
  event = { "BufRead", "BufNewFile" },
  keys = { "<leader>yh" },
}

License

Licensed under the MIT License. Check the LICENSE file for details.