Skip to content
forked from lePerdu/kakboard

πŸ“‹ Clipboard managers warper for Kakoune

License

Notifications You must be signed in to change notification settings

NNBnh/clipb.kak

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

clipb.kak

Clipboard managers warper for Kakoune

License: GPL-3.0 Development completed

πŸ’‘ About

clipb.kak is a clipboard integration for Kakoune, an extremely strip down fork of Zach Peltzer's Kakboard with some design improvements.

πŸ“” Story

After making clipb i revisit Kakboard and try to improve the plugin by make some pull request. But because i had make a lot of change that might break people existing config, i decided to maintain my own fork of the plugin.

✨ Features

  • Improve startup speed, took ~20ms less time to startup than Kakboard
  • Support multiple selections copy to clipboard (enable this feature)
  • Have no plugin keybinding to follow Steve Losh's blog: "Mapping Keys the Right Way", instead use register hook to sync clipboard
  • Remove unnecessary commands from Kakboard:
    • pull-if-unset: this command is pretty handy in the Kakboard script but the end users will not found it really useful and fairly easy to script if need
    • push-if-unset: again with this command, the end users will not found it really useful
    • with-pull-clipboard: user can simply done this with clipb-get; exec <key>
    • with-push-clipboard: again, user can simply run exec <key>; clipb-set
  • More system clipboards supported, supported clipboard managers are:

πŸš€ Setup

🧾 Dependencies

πŸ“₯ Installation

With plug.kak just put this in your kakrc:

plug 'NNBnh/clipb.kak' config %{
	clipb-detect
	clipb-enable
}

⌨️ Usage

clipb.kak come with many commands:

  • clipb-detect: detect clipboard command on the system to set clipb_set_command and clipb_get_command options
  • clipb-set: set system clipboard from the " (default) register
  • clipb-get: get system clipboard into the " (default) register
  • clipb-enable: enable clipb by adding these hooks:
    hook -group 'clipb' global WinCreate        .* %{ clipb-get }
    hook -group 'clipb' global FocusIn          .* %{ clipb-get }
    hook -group 'clipb' global RegisterModified \" %{ clipb-set }
    
  • clipb-disable: disable clipb by removing clipb group hooks

βš™οΈ Configuration

To enable multiple selections copy to clipboard, change the clipb_multiple_selections option to true:

set-option global clipb_multiple_selections 'true'

You can change the set or get (copy or paste) command manually:

set-option global clipb_set_command '<SET_COMMAND>'
set-option global clipb_get_command '<GET_COMMAND>'

or let the plugin detect the clipboard commands on the system:

clipb-detect

πŸ’Œ Credits

Special thanks to:






Fork with ❀️ by NNB

Buy Me a Coffee