simplify clang-enable-autocomplete, no need for shell

This commit is contained in:
Maxime Coste 2013-10-31 19:14:44 +00:00
parent 471aeaab9a
commit 5e54705e26

View File

@ -29,10 +29,11 @@ def clang-complete %{
} }
def clang-enable-autocomplete %{ def clang-enable-autocomplete %{
hook window -id clang-autocomplete InsertIdle .* %{ eval -draft %{ hook window -id clang-autocomplete InsertIdle .* %{
exec <a-h> exec -draft <space><a-h><a-k>(\.|->|::).$<ret>
%sh{ [[ $kak_selection =~ .*(\.|->|::).$ ]] && echo "exec <a-space>; eval -client $kak_client echo 'completing...'; clang-complete" } echo 'completing...'
}} clang-complete
}
} }
def clang-disable-autocomplete %{ rmhooks window clang-autocomplete } def clang-disable-autocomplete %{ rmhooks window clang-autocomplete }