Clipboard managers warper for Kakoune
clipb.kak
is a clipboard integration for Kakoune, an extremely strip down fork of Zach Peltzer's Kakboard with some design improvements.
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.
- 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 needpush-if-unset
: again with this command, the end users will not found it really usefulwith-pull-clipboard
: user can simply done this withclipb-get; exec <key>
with-push-clipboard
: again, user can simply runexec <key>; clipb-set
- More system clipboards supported, supported clipboard managers are:
wl-clipboard
xclip
xsel
pbcopy
,pbpaste
cygwin
's/dev/clipboard
termux-api
wl-clipboard
for Waylandxclip
orxsel
for X.orgtermux-api
for Termux
With plug.kak
just put this in your kakrc
:
plug 'NNBnh/clipb.kak' config %{
clipb-detect
clipb-enable
}
clipb.kak
come with many commands:
clipb-detect
: detect clipboard command on the system to setclipb_set_command
andclipb_get_command
optionsclipb-set
: set system clipboard from the"
(default) registerclipb-get
: get system clipboard into the"
(default) registerclipb-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 removingclipb
group hooks
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
Special thanks to:
Fork with β€οΈ by NNB