Created
April 8, 2016 09:24
-
-
Save pauldub/96aba025e147353be2f8331ece7e6060 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def -allow-override -params 1 godoc %{ | |
%sh{ | |
output=$(mktemp -d -t kak-temp-XXXXXXXX)/fifo | |
mkfifo ${output} | |
(go doc $1 > ${output}) > /dev/null 2>&1 < /dev/null & | |
echo "eval -client %opt{docsclient} echo ' | |
edit! -fifo ${output} *godoc* | |
hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output})}} | |
'" | |
} | |
} | |
def -allow-override godoc-at-point %{ godoc %val{selection} } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment