Skip to content

A Neovim plugin that provides a clean paste functionality by removing \r (carriage return) characters from yanked or clipboard text.

Notifications You must be signed in to change notification settings

minamorl/nvim-clean-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

nvim-clean-paste

A Neovim plugin that provides a clean paste functionality by removing \r (carriage return) characters from yanked or clipboard text.

Features

  • Removes \r characters from yanked text within Neovim
  • Supports cleaning text from the system clipboard (* or + registers)
  • Provides a custom paste command and mapping for convenient usage

Installation

Using a Plugin Manager (Recommended)

Install via your favorite plugin manager. For example, using lazy.nvim:

{ 'minamorl/nvim-clean-paste' }

Usage

The plugin provides a custom function clean_paste() that can be used to clean the text in the default register (") or the system clipboard register (* or +).

For example, you can replace the default paste command with the custom paste command:

vim.api.nvim_set_keymap('n', 'p', ':lua require("nvim-clean-paste").custom_paste()<CR>', { noremap = true, silent = true })

LICENSE

MIT

About

A Neovim plugin that provides a clean paste functionality by removing \r (carriage return) characters from yanked or clipboard text.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages