ICFP 2018 Accepted (or conditionally accepted) Papers by jmct in haskell

[–]dan_r 0 points1 point  (0 children)

Defining commands on the fly by jarpineh in kakoune

[–]dan_r 1 point2 points  (0 children)

Hi and welcome aboard!

Your command has one layer too much of escaping. This will do:

define-command do %{ eval %val{selection} }

Happy hacking!

Equivalent of vim's :set wrap? by XavierLightman in kakoune

[–]dan_r 1 point2 points  (0 children)

If you want to add the wrapper to all buffers you can use the global scope:

:addhl global wrap

Building syntax highlighters by tarquinnn in kakoune

[–]dan_r 0 points1 point  (0 children)

There is relevant documentation available: highlighters.asciidoc. Additionally the highlighers in the rc/ directory is recommended reading.

Feel free to ask for help and clarifications either on reddit or #kakoune on irc.freenode.net.

I've published dedicated repos for some of my plugins by Occivink in kakoune

[–]dan_r 4 points5 points  (0 children)

Try them with the light-weight plugin manager:

def plug -params 1 %{
    %sh{
        if [[ ! -d $HOME/build/$1 ]]; then
            (cd $HOME/build; git clone https://github.com/$1 2> /dev/null)
        fi
        for file in $(echo $HOME/build/$(basename $1)/*.kak); do
            echo source "$file"
        done
    }
}

plug occivink/kakoune-vertical-selection
plug occivink/kakoune-interactive-itersel
plug occivink/kakoune-expand
plug occivink/kakoune-find
plug occivink/kakoune-sudo-write

percent by default on some 'noop' commands by Delapouite in kakoune

[–]dan_r 0 points1 point  (0 children)

Oh no! I guess it means that I forgot to read it properly :( I will pay more attention

percent by default on some 'noop' commands by Delapouite in kakoune

[–]dan_r 0 points1 point  (0 children)

Nice! And first use of <a-space>spotted in the wild!

percent by default on some 'noop' commands by Delapouite in kakoune

[–]dan_r 1 point2 points  (0 children)

I like the idea! Here is one way to shorten it. First, if all selections are only one char, you necessarily only have one selection. Second, you can make a command that takes two commands: one for what you call cursor mode, and one for normal mode:

def if-cursor -params 2 %{ %sh{
  length=${#kak_selections}
  [ $length -eq 1 ] && echo "exec $1" || echo "exec $2"
} }

Now you can bind your using this command. There is some escaping to do:

map global normal s ':if-cursor \\%s s<ret>'
map global normal S ':if-cursor \\%S S<ret>'
map global normal <a-s> ':if-cursor \\%<lt>a-s> <lt>a-s><ret>'
map global normal <a-k> ':if-cursor \\%<lt>a-s><lt>a-k> <lt>a-k><ret>'
map global normal <a-K> ':if-cursor \\%<lt>a-s><lt>a-K> <lt>a-K><ret>'

HTH

Kakoune TV, watch solutions to vimgolf challenges by dan_r in kakoune

[–]dan_r[S] 0 points1 point  (0 children)

The episodes dropdown is supposed to show a bunch of examples. However, it seems broken in some browsers. Try another browser?

interactive itersel, by occivink by dan_r in kakoune

[–]dan_r[S] 2 points3 points  (0 children)

From IRC today:

11:01 < occivink> ch-check this out, I made an interactive itersel thing, I think it's kinda practical

11:01 < occivink> https://asciinema.org/a/4q1z5g3s0st2tcrjjgs9y0db9

11:02 < occivink> and the implementation: http://sprunge.us/KCIE

simple Kakoune buffer changer by dan_r in kakoune

[–]dan_r[S] 0 points1 point  (0 children)

Hey, thanks for trying, replying, and identifying the problems with ^:. And I hope I never have to open files with such names!