- Notifications
You must be signed in to change notification settings - Fork750
Adria Arrufat edited this pageDec 6, 2022 ·10 revisions
bc stands for "basic calculator"
https://en.wikipedia.org/wiki/Bc_(programming_language)
define-command -hidden -params2 inc %{try %{evaluate-commands%sh{ ["$1"= 0 ]&& count=1|| count="$1"printf'%s%s''exec h"_/\d<ret><a-i>na'"$2($count)<esc>|{<space>cat<semicolon>echo<semicolon>}|bc<ret>" }}catch %{execute-keys l}}mapglobal normal <c-a>': inc %val{count} +<ret>'mapglobal normal <c-x>': inc %val{count} -<ret>'
See pluginhttps://gitlab.com/Screwtapello/kakoune-inc-dec
mapglobal normal =': prompt math: %{exec "a%val{text}<lt>esc>|{ cat; echo; }|bc<lt>ret>"}<ret>'
See pluginhttps://github.com/alexherbo2/bc.kak
- Normal mode commands
- Avoid the escape key
- Implementing user mode (Leader key)
- Kakoune explain
- Kakoune TV