Skip to content

Instantly share code, notes, and snippets.

@thacuber2a03
Last active December 20, 2024 22:46
Show Gist options
  • Save thacuber2a03/c870cf68b8a27045b81a8d76a083c379 to your computer and use it in GitHub Desktop.
Save thacuber2a03/c870cf68b8a27045b81a8d76a083c379 to your computer and use it in GitHub Desktop.
notes on running kakoune on windows

cygwin

  • get make, and gcc-c++ or clang
  • clone repo with core.autocrlf set to false:
    • git: git clone -c core.autocrlf=false https://github.com/mawww/kakoune
    • gh: gh repo clone mawww/kakoune -- -c core.autocrlf=false
  • if you forget to set core.autocrlf then get dos2unix and run it on all files in share/kak:
    find /path/to/share/kak/ -type f -exec dos2unix {} \;
  • make install is enough
  • bindings to interface with system clipboard:
    map -docstring "copy to system clipboard"      global user y ': nop %sh{ printf %s "$kak_selections" > /dev/clipboard }<ret>'
    map -docstring "replace with system clipboard" global user R '|cat /dev/clipboard<ret>s\r<ret>d<c-o>'
    map -docstring "append from system clipboard"  global user p '<a-!>cat /dev/clipboard<ret>s\r<ret>d<c-o>'
    map -docstring "insert from system clipboard"  global user P '!cat /dev/clipboard<ret>s\r<ret>d<c-o>'

WSL

  • only mostly works with Windows 11; making it work with Windows 10 might be harder since its gcc version is outdated, and I have no idea if clang works well, but it should
  • clone and install the way you'd do on Unix-likes
  • even the X11 clipboard bindings listed in Kakoune's wiki work well
  • TODO: check if installing from the Snap Store works fine
  • bindings to interface with system clipboard:
    map -docstring "copy to system clipboard"      global user y '<a-|> xsel --input --clipboard <ret>s\r<ret>d<c-o>'
    map -docstring "replace with system clipboard" global user R '|xsel --output --clipboard<ret>s\r<ret>d<c-o>'
    map -docstring "append from system clipboard"  global user p '<a-!>xsel --output --clipboard<ret>s\r<ret>d<c-o>'
    map -docstring "insert from system clipboard"  global user P '!xsel --output --clipboard<ret>s\r<ret>d<c-o>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment