1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 13:32:27 +01:00

added count support to gi

This commit is contained in:
Martin Stubenschrott
2008-03-31 12:39:56 +00:00
parent bbfdd78660
commit 2750f36032
4 changed files with 53 additions and 45 deletions

1
NEWS
View File

@@ -11,6 +11,7 @@
of bringing up the bookmarks/history window of bringing up the bookmarks/history window
* IMPORTANT: "B" mapping now works just like :buffers, old bufferwindow will be removed * IMPORTANT: "B" mapping now works just like :buffers, old bufferwindow will be removed
at some time. Use B5gt to jump to the 5th tab. 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 * ctrl-t on input fields starts a very basic vi-mode
* :play for playing a recorded macro * :play for playing a recorded macro
* :[del]macros [regex] for listing/deleting recorded macros * :[del]macros [regex] for listing/deleting recorded macros

View File

@@ -294,21 +294,23 @@ liberator.Buffer = function () //{{{
liberator.mappings.add(modes, ["gi"], liberator.mappings.add(modes, ["gi"],
"Focus last used input field", "Focus last used input field",
function () function (count)
{ {
if (liberator.buffer.lastInputField) if (count < 1 && liberator.buffer.lastInputField)
liberator.buffer.lastInputField.focus(); liberator.buffer.lastInputField.focus();
else else
{ {
var first = liberator.buffer.evaluateXPath( 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) if (first)
first.focus(); first.focus();
else else
liberator.beep(); liberator.beep();
} }
}); },
{ flags: liberator.Mappings.flags.COUNT });
liberator.mappings.add(modes, ["gP"], liberator.mappings.add(modes, ["gP"],
"Open (put) a URL based on the current clipboard contents in a new buffer", "Open (put) a URL based on the current clipboard contents in a new buffer",

View File

@@ -9,6 +9,52 @@ section:Motion{nbsp}Commands[motion,scrolling]
List mappings how to scroll the window. 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] section:Copying{nbsp}Text[copying,yanking]
When running in X11 the text of the following commands is not only copyied to When running in X11 the text of the following commands is not only copyied to

View File

@@ -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| +
||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| +
||go\\{a-zA-Z0-9\\}|| ||go\\{a-zA-Z0-9\\}||
________________________________________________________________________________ ________________________________________________________________________________