.TP
.B cunmap
Remove a Command Mode keybinding.
-.TP
-.B complete
-Start a completion according to the current first chars in the inputbox. If
-completion is already started, switch to the next completion item.
-
-Following completions are available:
-.RS
-.nr step 1 1
-.IP \n[step] 3
-Commands `:'
-.IP \n+[step]
-Settings `:set '
-.IP \n+[step]
-Url-History and Bookmarks `:open \fIQUERY\fP' or `:tabopen \fIQUERY\fP'.
-If \fIQUERY\fP is given, this will be used to fetch matching urls from history
-file, or to find bookmarks from bookmark file. The urls from history will only
-be matched by their url, the bookmarks only by their tags. If multiple tags
-are given to get the bookmarks, only those bookmarks will be returned, that
-matches all the given tags or that don't have any tag set.
-.IP \n+[step]
-Searchqueries `/' or `?'
-.RE
-.TP
-.B complete-back
-If complation is already started, switch to the previous completion item.
.SS Hints
.TP
.BI "hint-link [" PREFIX "], hint-link-new [" PREFIX ]
.BI "hint-editor [" PREFIX "]"
Start hinting to open inputboxes or textareas with external editor. If
\fIPREFIX\fP is given, print this into the inputbox, default ';e'.
-.TP
-.B hint-focus-nex, hint-focus-prev
-Focus next or previous hint.
.SS Yank
.TP
.B yank-uri
Save the current opened uri with \fITAGS\fP to the bookmark file.
.SS Misc
.TP
+.B next, prev
+This are wrapper commands to start completion and to step through the
+completion items, or to focus previous or next hints if hinting is active.
+
+Following completions are available:
+.RS
+.nr step 1 1
+.IP \n[step] 3
+Commands `:'
+.IP \n+[step]
+Settings `:set '
+.IP \n+[step]
+Url-History and Bookmarks `:open \fIQUERY\fP' or `:tabopen \fIQUERY\fP'.
+If \fIQUERY\fP is given, this will be used to fetch matching urls from history
+file, or to find bookmarks from bookmark file. The urls from history will only
+be matched by their url, the bookmarks only by their tags. If multiple tags
+are given to get the bookmarks, only those bookmarks will be returned, that
+matches all the given tags or that don't have any tag set.
+.IP \n+[step]
+Searchqueries `/' or `?'
+.RE
+.TP
.BI run " [COMMAND LIST]"
Run is a command, that was introduced to have the ability to run multiple
other commands with a single call. Everything after the `run' is interpreted
.TP
.BI [ N ]N
Search for \fIN\fPnth previous search result.
-.TP
-.B ctrl\-n
-Foxus the next hint.
-.TP
-.B ctrl\-p
-Foxus the previous hint.
.SS COMMAND_MODE
.TP
.B tab
-Complete different sources in the inputbox.
+Complete different sources in the inputbox or if hinting is active, focus next
+hint.
.TP
.B shift\-tab
-Complete backward different sources in the inputbox.
+Complete backward different sources in the inputbox or if hinting is active,
+focus previous hint.
.TP
.B up
Step through history backward.
{"iunmap", command_unmap, {VB_MODE_INSERT}},
{"cunmap", command_unmap, {VB_MODE_COMMAND}},
{"set", command_set, {0}},
- {"complete", command_complete, {0}},
- {"complete-back", command_complete, {1}},
{"inspect", command_inspect, {0}},
{"hint-link", command_hints, {HINTS_TYPE_LINK | HINTS_PROCESS_OPEN, "."}},
{"hint-link-new", command_hints, {HINTS_TYPE_LINK | HINTS_PROCESS_OPEN | HINTS_OPEN_NEW, ","}},
{"hint-image-open", command_hints, {HINTS_TYPE_IMAGE | HINTS_PROCESS_OPEN, ";i"}},
{"hint-image-tabopen", command_hints, {HINTS_TYPE_IMAGE | HINTS_PROCESS_OPEN | HINTS_OPEN_NEW, ";I"}},
{"hint-editor", command_hints, {HINTS_TYPE_EDITABLE, ";e"}},
- {"hint-focus-next", command_hints_focus, {0}},
- {"hint-focus-prev", command_hints_focus, {1}},
{"yank-uri", command_yank, {COMMAND_YANK_PRIMARY | COMMAND_YANK_SECONDARY | COMMAND_YANK_URI}},
{"yank-selection", command_yank, {COMMAND_YANK_PRIMARY | COMMAND_YANK_SECONDARY | COMMAND_YANK_SELECTION}},
{"open-clipboard", command_paste, {VB_CLIPBOARD_PRIMARY | VB_CLIPBOARD_SECONDARY | VB_TARGET_CURRENT}},
{"bookmark-add", command_bookmark, {1}},
{"eval", command_eval, {0}},
{"editor", command_editor, {0}},
+ {"next", command_nextprev, {0}},
+ {"prev", command_nextprev, {1}},
};
return success;
}
-gboolean command_complete(const Arg *arg)
-{
- /* mode will be set in completion_complete */
- completion_complete(arg->i ? true : false);
-
- return true;
-}
-
gboolean command_inspect(const Arg *arg)
{
gboolean enabled;
return true;
}
-gboolean command_hints_focus(const Arg *arg)
-{
- hints_focus_next(arg->i ? true : false);
-
- return true;
-}
-
gboolean command_yank(const Arg *arg)
{
vb_set_mode(VB_MODE_NORMAL, true);
return true;
}
+gboolean command_nextprev(const Arg *arg)
+{
+ if (vb.state.mode & VB_MODE_HINTING) {
+ hints_focus_next(arg->i ? true : false);
+ } else {
+ /* mode will be set in completion_complete */
+ completion_complete(arg->i ? true : false);
+ }
+
+ return true;
+}
+
static void editor_resume(GPid pid, int status, OpenEditorData *data)
{
char *text;
gboolean command_map(const Arg *arg);
gboolean command_unmap(const Arg *arg);
gboolean command_set(const Arg *arg);
-gboolean command_complete(const Arg *arg);
gboolean command_inspect(const Arg *arg);
gboolean command_hints(const Arg *arg);
-gboolean command_hints_focus(const Arg *arg);
gboolean command_yank(const Arg *arg);
gboolean command_paste(const Arg *arg);
gboolean command_search(const Arg *arg);
gboolean command_bookmark(const Arg *arg);
gboolean command_eval(const Arg *arg);
gboolean command_editor(const Arg *arg);
+gboolean command_nextprev(const Arg *arg);
#endif /* end of include guard: _COMMAND_H */
"nmap zo=zoomout",
"nmap zO=zoomoutfull",
"nmap zz=zoomreset",
- "cmap <tab>=complete",
- "cmap <shift-tab>=complete-back",
- "cmap <ctrl-p>=hint-focus-prev",
- "cmap <ctrl-n>=hint-focus-next",
+ "cmap <tab>=next",
+ "cmap <shift-tab>=prev",
"cmap <up>=hist-prev",
"cmap <down>=hist-next",
"imap <ctrl-t>=editor",