diff --git a/NEWS b/NEWS index 15e38755..3425a373 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ of bringing up the bookmarks/history window * IMPORTANT: "B" mapping now works just like :buffers, old bufferwindow will be removed at some time. Use B5gt to jump to the 5th tab. + * gi accepts now a count to jump to the nth input field * ctrl-t on input fields starts a very basic vi-mode * :play for playing a recorded macro * :[del]macros [regex] for listing/deleting recorded macros diff --git a/content/buffer.js b/content/buffer.js index 69dd0d6f..7b0b4709 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -294,21 +294,23 @@ liberator.Buffer = function () //{{{ liberator.mappings.add(modes, ["gi"], "Focus last used input field", - function () + function (count) { - if (liberator.buffer.lastInputField) + if (count < 1 && liberator.buffer.lastInputField) liberator.buffer.lastInputField.focus(); else { var first = liberator.buffer.evaluateXPath( - "//*[@type='text'] | //textarea | //xhtml:textarea").snapshotItem(0); + "//*[@type='text'] | //textarea | //xhtml:textarea") + .snapshotItem(count > 0 ? (count - 1) : 0); if (first) first.focus(); else liberator.beep(); } - }); + }, + { flags: liberator.Mappings.flags.COUNT }); liberator.mappings.add(modes, ["gP"], "Open (put) a URL based on the current clipboard contents in a new buffer", diff --git a/locale/en-US/buffer.txt b/locale/en-US/buffer.txt index 819d7006..bd6ca87d 100644 --- a/locale/en-US/buffer.txt +++ b/locale/en-US/buffer.txt @@ -9,6 +9,52 @@ section:Motion{nbsp}Commands[motion,scrolling] List mappings how to scroll the window. + +section:Jumping{nbsp}to{nbsp}Elements[jumping] + +|gi| +||[count]gi|| +________________________________________________________________________________ +Focus last used input field. If there is no last input field, it focuses the +first input field. When used with [count] it directly jumps to the [count]th input +field. +________________________________________________________________________________ + + +|]f| + +||[count]]f|| +________________________________________________________________________________ +Focus next frame. Transfer keyboard focus to the [count]th next frame in +order. The newly focused frame is briefly colored red. Does not wrap. +________________________________________________________________________________ + + +|[f| + +||[count][f|| +________________________________________________________________________________ +Focus previous frame. Transfer keyboard focus to the [count]th previous frame +in order. The newly focused frame is briefly colored red. Does not wrap. +________________________________________________________________________________ + + +|]]| + +||[count]]]|| +________________________________________________________________________________ +Open link labeled with "next" or ">". Useful when browsing forums or +documentation. Change 'nextpattern' to modify its behavior. It follows +relations between files too. +________________________________________________________________________________ + + +|[[| + +||[count][[|| +________________________________________________________________________________ +Open link labeled with "prev", "previous" or "<". Useful when browsing forums +or documentation. Change 'previouspattern' to modify its behavior. It follows +relations between files too. +________________________________________________________________________________ + + section:Copying{nbsp}Text[copying,yanking] When running in X11 the text of the following commands is not only copyied to diff --git a/locale/en-US/various.txt b/locale/en-US/various.txt index 548c61ad..2ede71c5 100644 --- a/locale/en-US/various.txt +++ b/locale/en-US/various.txt @@ -112,39 +112,6 @@ Do nothing. This command is useful for disabling a specific mapping. [c]:map ________________________________________________________________________________ -|]f| + -||[count]]f|| -________________________________________________________________________________ -Focus next frame. Transfer keyboard focus to the [count]th next frame in -order. The newly focused frame is briefly colored red. Does not wrap. -________________________________________________________________________________ - - -|[f| + -||[count][f|| -________________________________________________________________________________ -Focus previous frame. Transfer keyboard focus to the [count]th previous frame -in order. The newly focused frame is briefly colored red. Does not wrap. -________________________________________________________________________________ - - -|]]| + -||[count]]]|| -________________________________________________________________________________ -Open link labeled with "next" or ">". Useful when browsing forums or -documentation. Change 'nextpattern' to modify its behavior. It follows -relations between files too. -________________________________________________________________________________ - - -|[[| + -||[count][[|| -________________________________________________________________________________ -Open link labeled with "prev", "previous" or "<". Useful when browsing forums -or documentation. Change 'previouspattern' to modify its behavior. It follows -relations between files too. -________________________________________________________________________________ - |A| + ||A|| @@ -246,14 +213,6 @@ activated or not depends on the 'activate' option. ________________________________________________________________________________ -|gi| -||gi|| -________________________________________________________________________________ -Focus last used input field. If there is no last input field, it focuses the -first input field. -________________________________________________________________________________ - - |go| + ||go\\{a-zA-Z0-9\\}|| ________________________________________________________________________________