From 13ce49009d4843f5805cf99e4f15dadb502ef0f8 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 29 Oct 2014 23:23:36 +0000 Subject: [PATCH] Use an alias for the :alt command defined in cpp.kak --- rc/cpp.kak | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rc/cpp.kak b/rc/cpp.kak index 48e693b2..4f1fb21e 100644 --- a/rc/cpp.kak +++ b/rc/cpp.kak @@ -65,12 +65,16 @@ hook global WinSetOption filetype=cpp %[ hook window InsertChar \n -group cpp-indent _cpp_indent_on_new_line hook window InsertChar \{ -group cpp-indent _cpp_indent_on_opening_curly_brace hook window InsertChar \} -group cpp-indent _cpp_indent_on_closing_curly_brace + + alias window alt cpp-alternative-file ] hook global WinSetOption filetype=(?!cpp).* %{ rmhl cpp rmhooks window cpp-indent rmhooks window cpp-hooks + + unalias window alt cpp-alternative-file } def -hidden _cpp_insert_include_guards %{ @@ -81,7 +85,7 @@ hook global BufNew .*\.(h|hh|hpp|hxx|H) _cpp_insert_include_guards decl str-list alt_dirs ".;.." -def alt -docstring "Jump to the alternate file (header/implementation)" %{ %sh{ +def cpp-alternative-file -docstring "Jump to the alternate file (header/implementation)" %{ %sh{ alt_dirs=$(echo ${kak_opt_alt_dirs} | sed -e 's/;/ /g') file=$(basename ${kak_buffile}) dir=$(dirname ${kak_buffile})