From 732d1c3bd19405bb3144f0b56ec1d10758ab8ec5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 6 Jun 2014 13:58:35 +0100 Subject: [PATCH] Improve commands documentation --- src/commands.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/commands.cc b/src/commands.cc index ba80c52f..818919a5 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -483,9 +483,14 @@ CandidateList complete_scope(StringView prefix) const CommandDesc add_hook_cmd = { "hook", nullptr, - "hook : add to be executed on hook in context", + "hook : add in to be executed on hook \n" + "scope can be: \n" + " * global: hook is executed for any buffer or window\n" + " * buffer: hook is executed only for the current buffer\n" + " (and any window for that buffer)\n" + " * window: hook is executed only for the current window\n", ParameterDesc{ - SwitchMap{ { "id", { true, "set hook id" } } }, + SwitchMap{ { "id", { true, "set hook id, see rmhooks" } } }, ParameterDesc::Flags::None, 4, 4 }, CommandFlags::None, @@ -520,7 +525,7 @@ const CommandDesc add_hook_cmd = { const CommandDesc rm_hook_cmd = { "rmhooks", nullptr, - "rmhooks : remove all hooks that whose id is ", + "rmhooks : remove all hooks whose id is ", ParameterDesc{ SwitchMap{}, ParameterDesc::Flags::None, 2, 2 }, CommandFlags::None, CommandCompleter{}, @@ -696,7 +701,8 @@ const CommandDesc echo_cmd = { const CommandDesc debug_cmd = { "debug", nullptr, - "debug ...: write debug informations in debug buffer", + "debug : write some debug informations in the debug buffer\n" + " existing commands: info", ParameterDesc{ SwitchMap{}, ParameterDesc::Flags::SwitchesOnlyAtStart, 1 }, CommandFlags::None, CommandCompleter{}, @@ -794,7 +800,7 @@ const CommandDesc declare_option_cmd = { "decl", nullptr, "decl [value]: declare option of type .\n" - "set its initial value to if given\n" + "set its initial value to if given and if the option did not exist\n" "Available types:\n" " int: integer\n" " bool: boolean (true/false or yes/no)\n" @@ -847,7 +853,6 @@ const CommandDesc declare_option_cmd = { } }; - KeymapManager& get_keymap_manager(const String& scope, Context& context) { if (prefix_match("global", scope)) @@ -1037,7 +1042,7 @@ const CommandDesc exec_string_cmd = { const CommandDesc eval_string_cmd = { "eval", nullptr, - "eval : execute commands as if entered by user", + "eval ...: execute commands as if entered by user", context_wrap_params, CommandFlags::None, CommandCompleter{},