No project description provided
Project description
Zach's Overengineered Kakoune Plugins
I loved seeing the plugins that people write for Kakoune, so I decided to write some on my own, but with extreme gusto. Sure, you could probaly accomplish the same results with a string of 7 shell commands, but where's the fun in that when you could have rigorous testing, fancy documentation, interactive menus and debugging, and powerful continuous integration?!
Installation
I recommend using pipx for installation. It allows you to install python packages on your machine in separate virtual environments without having to manage the virtual environments yourself. pip
also works if you prefer that.
pipx install kak_plugins
Dependencies
- Kakoune of course
- kakoune.cr
- enables us to retrieve info from Kakoune
- provides an interface to control Kakoune
- A clipboard command-line utility. I use these:
pbcopy
for OSX- xclip for Linux
- wl-clipboard for Wayland (if you don't know what this is and you use Linux, you'll probably use
xclip
)
Setup
There are some environment varibles you will need to define in order to use these plugins. You would probably define these in your ~/.bashrc
, zshrc
, or ~/.profile
. I define mine [here](https://github.com/abstractlyZach/dotfiles/blob/master/common/.profile]
# program that reads stdin and writes to your system clipboard
export CLIPBOARD="pbcopy"
Logging
Logs are a good way of getting an idea of what's going on in the code. Logs will be written to stderr by default, but if you turn on logging and don't specify a path, then logs will be written in a temporary directory in a file that has the name of the plugin. See here for rules on where you can find logs on your system
Plugins
github-permalink
Create a permalink to a line or range of lines in a GitHub repo that matches your current selection in Kakoune. Then copy that permalink to your clipboard program.
in kak
This method is great for using in your everyday editing
- open a file in Kakoune
- make a selection
- in normal mode, use
:$ github-permalink
- you now have a permalink to your kakoune selection. it should look something like this https://github.com/abstractlyZach/kak_plugins/blob/write-readme/README.md#L40
I like binding this command to hotkeys so I can hit 2 buttons and then paste the link into Slack or something.
in a terminal
This method is great for learning, development, and debugging
- open a file in kakoune
- make a selection
- open a connected terminal. there are a couple of recommended methods
- use
:>
in normal mode - kcr-fzf-shell
- use
github-permalink --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kak_plugins-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11859683c441ce4af77ffd7a2077f461e8c96df4411f65a2b960376b8d2caf26 |
|
MD5 | 91a95a83f20635edc38b083b219c7a35 |
|
BLAKE2b-256 | 497ae2bd9b023263705762f598ebb661974d88a6ce687dc665abf4468bde9657 |