All Projects → kevinhwang91 → nvim-hclipboard

kevinhwang91 / nvim-hclipboard

Licence: BSD-3-Clause license
Hijack your clipboard in Neovim

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to nvim-hclipboard

Vim Yoink
Vim plugin that maintains a yank history to cycle between when pasting
Stars: ✭ 225 (+1084.21%)
Mutual labels:  clipboard, nvim
vim-cutlass
Plugin that adds a 'cut' operation separate from 'delete'
Stars: ✭ 134 (+605.26%)
Mutual labels:  clipboard, nvim
JuliaFormatter.vim
A (N)Vim plugin for formatting Julia code using JuliaFormatter.jl.
Stars: ✭ 61 (+221.05%)
Mutual labels:  nvim
dotfiles
i3, Vim, Bash, Ruby, Typescript & React, Elixir, Golang & more!
Stars: ✭ 22 (+15.79%)
Mutual labels:  nvim
kosmikoa.nvim
A dark color scheme for Neovim with support for LSP, Treesitter. This mirror is deprecated. Use the repo at https://sr.ht/~novakane/kosmikoa.nvim/
Stars: ✭ 23 (+21.05%)
Mutual labels:  nvim
nabla.nvim
take your scientific notes ✏️ in Neovim
Stars: ✭ 391 (+1957.89%)
Mutual labels:  nvim
copypasta
Cross-platform Rust system clipboard library
Stars: ✭ 186 (+878.95%)
Mutual labels:  clipboard
modes.nvim
Prismatic line decorations for the adventurous vim user
Stars: ✭ 299 (+1473.68%)
Mutual labels:  nvim
nrepl.nvim
Neovim REPL for lua and vim script
Stars: ✭ 41 (+115.79%)
Mutual labels:  nvim
nvim-todoist.lua
Todoist plugin for Neovim in pure Lua, inspired by https://github.com/romgrk/todoist.nvim, which you should use instead
Stars: ✭ 22 (+15.79%)
Mutual labels:  nvim
clipper
📋 Cross Platform Desktop App to Save history of all information you copy and use them whenever with a solitary snap
Stars: ✭ 42 (+121.05%)
Mutual labels:  clipboard
vim-lighthaus
A Lighthaus theme for (n)vim, vim-airline and lightline
Stars: ✭ 33 (+73.68%)
Mutual labels:  nvim
dotfiles
Poom's Neovim, Tmux, Fish and other configurations for macOS & Linux. Literally my entire world.
Stars: ✭ 36 (+89.47%)
Mutual labels:  nvim
angr.vim
A pleasant, mild, dark (n)vim theme.
Stars: ✭ 53 (+178.95%)
Mutual labels:  nvim
nvim-base16
Neovim plugin for building a sync base16 colorscheme. Includes support for Treesitter and LSP highlight groups.
Stars: ✭ 307 (+1515.79%)
Mutual labels:  nvim
nvim-metals
A Metals plugin for Neovim
Stars: ✭ 265 (+1294.74%)
Mutual labels:  nvim
dash.nvim
Script runner for quick iteration. Bring your scripting to the next level.
Stars: ✭ 37 (+94.74%)
Mutual labels:  nvim
substrata.nvim
A cold, dark color scheme for Neovim
Stars: ✭ 89 (+368.42%)
Mutual labels:  nvim
AsyncClipboardService
📋 An async & low-level windows clipboard service implementation for .NET, C#
Stars: ✭ 14 (-26.32%)
Mutual labels:  clipboard
unlimited-clipboard
simple clipboard manager with unlimited history on electron
Stars: ✭ 21 (+10.53%)
Mutual labels:  clipboard

nvim-hclipboard

To be archives. :h ModeChanged since 0.7.0

Hijack your clipboard, make you become the host of the clipboard!!!

Hclipboard will bypass the text into clipboard for change operator in visual/select mode.

Run :help v_c or :help v_s to get more information.

Expanding snippet will enter select mode automatically which will pollute your clipboard. The initial motivation of Hclipboard is to solve this issue.

hclipboard_demo.mp4

set clipboard=unnamedplus in Neovim and use xsel as my system clipboard

Table of contents

Features

  • Hijacked your clipboard unconsciously
  • Customize your clipboard

Quickstart

Requirements

Installation

Install nvim-hclipboard with Vim-plug:

Plug 'kevinhwang91/nvim-hclipboard'

Install nvim-hclipboard with Packer.nvim:

use {'kevinhwang91/nvim-hclipboard'}

Usage

" vimscript
lua require('hclipboard').start()
-- lua
require('hclipboard').start()

Documentation

Function

Functions are all inside hclipboard module, get module by require('hclipboard')

  • start(): start to hijack clipboard provider

  • stop(): stop to hijack clipboard provider

Setup and description

{
    should_bypass_cb = {
        description = [[Callback function to decide whether to let text bypass the clipboard.
            *WIP*
            There's no guarantee that this function will not be changed in the future. If it is
            changed, it will be listed in the CHANGES file.]],
        default = nil
    },
}

Advanced configuration

-- bypass text into clipboard for change and delete operator in visual/select mode.
require('hclipboard').setup({
    -- Return true the text will be bypassed the clipboard
    -- @param regname register name
    -- @param ev vim.v.ev TextYankPost event
    should_bypass_cb = function(regname, ev)
        local ret = false
        if ev.visual and (ev.operator == 'd' or ev.operator == 'c') then
            if ev.regname == '' or ev.regname == regname then
                ret = true
            end
        end
        return ret
    end
}).start()

default behavior bypass change operator but don't bypass delete operator

Feedback

  • If you get an issue or come up with an awesome idea, don't hesitate to open an issue in github.
  • If you think this plugin is useful or cool, consider rewarding it a star.

License

The project is licensed under a BSD-3-clause license. See LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].