Skip to content

atiladefreitas/lazyclip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LazyClip

LazyClip is a powerful yet minimalist clipboard manager for Neovim, designed with simplicity and efficiency in mind. It integrates seamlessly with your Neovim setup and provides an intuitive floating window to browse and paste clipboard history. LazyClip is especially crafted for users of Lazy.nvim and works great with popular Neovim distributions.

๐Ÿš€ Features

  • ๐Ÿ“‹ View up to 9 clipboard items per page in a floating window.
  • ๐Ÿ”ข Fixed numbered slots [1] to [9] for quick reference.
  • ๐ŸŒŸ Paste with ease: Use number keys or <Enter> to paste items directly into your editor.
  • โฎ๏ธ Navigate clipboard history with H (previous page) and L (next page).
  • โฐ Timestamps: See when each item was copied with time indicators.
  • ๐Ÿ–ผ๏ธ Live Preview: Preview clipboard content with syntax highlighting.
  • ๐Ÿ—‘๏ธ Delete items: Remove unwanted clipboard entries with d key.
  • ๐Ÿ’ฌ Better notifications: Enhanced feedback messages for all actions.
  • ๐Ÿ› ๏ธ Compatible with Lazy.nvim for effortless installation.

๐Ÿ“ฆ Installation

Prerequisites

  • Neovim >= 0.10.0
  • Lazy.nvim as your plugin manager.

Using Lazy.nvim

return {
        "atiladefreitas/lazyclip",
        config = function()
            require("lazyclip").setup({
                -- your custom config here (optional)
            })
        end,
        keys = {
            { "Cw", desc = "Open Clipboard Manager" },
        },
        -- Optional: Load plugin when yanking text
        event = { "TextYankPost" },
}

Run the following commands in Neovim to install LazyClip:

:Lazy sync

Default Configuration

LazyClip comes with sensible defaults that you can override:

{
    -- Core settings
    max_history = 100,      -- Maximum number of items to keep in history
    items_per_page = 9,     -- Number of items to show per page
    min_chars = 5,          -- Minimum characters required to store item
    
    -- Window appearance
    window = {
        relative = "editor",
        width = 70,         -- Width of the floating window
        height = 12,        -- Height of the floating window
        border = "rounded", -- Border style
    },
    
    -- Internal keymaps for the lazyclip window
    keymaps = {
        close_window = "q",      -- Close the clipboard window
        prev_page = "h",         -- Go to previous page
        next_page = "l",         -- Go to next page
        paste_selected = "<CR>", -- Paste the selected item
        move_up = "k",           -- Move selection up
        move_down = "j",         -- Move selection down
        delete_item = "d"        -- Delete selected item
    }
}

๐Ÿ› ๏ธ Usage

  1. Yank text in Neovim as usual using commands like y, yy, or yank.
  2. Open LazyClip with <leader>Cw.
  3. Browse through the last 9 copied items in a floating window.
  4. Paste an item:
    • Press the corresponding number key (1-9).
    • Or, navigate to the desired item with j/k and press <Enter>.
  5. Use h and l to navigate pages when you have more than 9 items.
  6. Delete items you no longer need with d.
  7. See timestamps showing when each item was copied (e.g., 5m, 2h, 1d).
  8. Preview content in the dedicated preview window with syntax highlighting.
  9. Press q to close the window.

๐Ÿ“ฅ Backlog

Planned features and improvements for future versions of LazyClip:

Core Features

  • System Clipboard Integration.
  • Persistent Clipboard History.
  • Clipboard Size Configuration

UI Enhancements

  • Customizable Floating Window.
  • Highlight Current Item.
  • Multi-Item Paste.

Quality of Life

  • Keybinding Configurability.
  • Timestamps for clipboard entries.
  • Live Preview with syntax highlighting.
  • Item deletion functionality.
  • Better notifications and feedback.
  • Performance Optimization.

๐Ÿ“ License

This project is licensed under the MIT License. See the LICENSE file for details.


๐Ÿ”– Versioning

We use Semantic Versioning for versioning. For the available versions, see the tags on this repository.


๐Ÿค Contributing

Contributions are welcome! If you'd like to improve LazyClip, feel free to:

  • Submit an issue for bugs or feature requests.
  • Create a pull request with your enhancements.

๐ŸŒŸ Acknowledgments

LazyClip was built with the Neovim community in mind. Special thanks to all the developers who contribute to the Neovim ecosystem and plugins like Lazy.nvim.


All my plugins

Repository Description Stars
LazyClip A Simple Clipboard Manager Stars
Dooing A Minimalist Todo List Manager Stars
TinyUnit A Practical CSS Unit Converter Stars

๐Ÿ“ฌ Contact

If you have any questions, feel free to reach out:

About

The laziest clipboard manager for Neovim

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •