Git Product home page Git Product logo

kakboard's Introduction

kakboard

Clipboard integration for kakoune.

Installation

With plug.kak (recommended)

Just add this to your kakrc:

plug "lePerdu/kakboard" %{
    hook global WinCreate .* %{ kakboard-enable }
}

Manually

Clone this repository and source the file kakboard.kak in your kakrc, then set it up to run with:

hook global WinCreate .* %{ kakboard-enable }

Usage

Just copy and paste with the normal commands (y, c, p, R, etc.)! Copy keys copy the main selection to the system clipboard and paste commands sync the system clipboard with the " register before executing. Copying/pasting to/from the system clipboard can be prevented by specifying a register to use, even the default " register.

Configuration

The kakboard_copy_cmd and kakboard_paste_cmd options specify the commands to copy to and paste from the system clipboard. If they are unset, kakboard will try to detect command pair to use.

Currently supports:

To change the keys for which clipboard syncing is done, just set the kakboard_copy_keys and kakboard_paste_keys options.

Note: This plugin will map all of the keys in kakboard_paste_keys and kakboard_copy_keys, so if you already have mappings for these keys, you will have to edit those bindings to call kakboard-{pull,push}-if-unset to sync the clipboard after copying / before pasting and remove said keys from kakboard's lists.

Commands

  • kakboard-enable/kakboard-disable/kakboard-toggle: enable/disable/toggle clipboard integration
  • kakboard-pull-clipboard: Pull system clipboard into the " register.
  • kakboard-pull-if-unset: Call kakboard-pull-clipboard if %val{register} is empty.
  • kakboard-with-pull-clipboard <keys>: Call kakboard-pull-if-unset then execute <keys>.
  • kakboard-push-clipboard: Set system clipboard from the " register.
  • kakboard-push-if-unset: Call kakboard-push-clipboard if %val{register} is empty.
  • kakboard-with-push-clipboard <keys>: Execute <kys> then call kakboard-push-if-unset

Limitations

System clipboards don't support multiple selections, so only the primary selection is copied to the clipboard. Correspondingly, when the " register is synced to the system clipboard, it is filled with a single value and remaining values, if any, are deleted. To get around this, the " register can be specified explicitly when pasting multiple selections (before syncing with the system clipboard) as mentioned above.

License

MIT License

kakboard's People

Contributors

leperdu avatar delapouite avatar tomkpz avatar valpackett avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.