Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chambln/kakoune-kit

A Git porcelain inside Kakoune
https://github.com/chambln/kakoune-kit

kakoune plugin

Last synced: about 16 hours ago
JSON representation

A Git porcelain inside Kakoune

Awesome Lists containing this project

README

        

# Kit – A Git porcelain inside [Kakoune](https://kakoune.org)

This plugin is far from complete, but not totally useless right now.

So far it’s just a few hooks that coerce the selection onto the file
paths and SHA1s in `:git status -s` and `:git log` buffers. Combine this
with `: … %val{selections} …` mappings to create a
selection-oriented Git interface.

## Configuration

Suggested configuration:

``` kak
plug chambln/kakoune-kit config %{
map global user g ': git status -bs' -docstring 'git status'
hook global WinSetOption filetype=git-status %{
map window normal c ': git commit --verbose '
map window normal l ': git log --oneline --graph -- f'
map window normal d ': -- %val{selections} git diff '
map window normal D ': -- %val{selections} git diff --cached '
map window normal a ': -- %val{selections} git add '
map window normal A ': -- %val{selections} terminal git add -p '
map window normal r ': -- %val{selections} git reset '
map window normal R ': -- %val{selections} terminal git reset -p '
map window normal o ': -- %val{selections} git checkout '
}
hook global WinSetOption filetype=git-log %{
map window normal d ': %val{selections} git diff '
map window normal ': %val{selections} git show '
map window normal r ': %val{selections} git reset '
map window normal R ': %val{selections} terminal git reset -p '
map window normal o ': %val{selections} git checkout '
}
}
```