mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 22:58:01 +01:00
added :tablast etc. commands
This commit is contained in:
2
AUTHORS
2
AUTHORS
@@ -10,5 +10,5 @@ Patches:
|
|||||||
* Lars Kindler (:buffer(s) functionality)
|
* Lars Kindler (:buffer(s) functionality)
|
||||||
* Lee Hinman (:open ./.. support)
|
* Lee Hinman (:open ./.. support)
|
||||||
* Bart Trojanowski (Makefile)
|
* Bart Trojanowski (Makefile)
|
||||||
* Doug Kearns (vimperator.vim)
|
* Doug Kearns (vimperator.vim, :tabonly etc. commands)
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<pre>
|
<pre>
|
||||||
2007-05-02:
|
2007-05-02:
|
||||||
* version ???
|
* version ???
|
||||||
|
* added :tabonly and :tabrewind and :tablast commands and some futher aliases :tabNext, etc. (by Doug Kearns)
|
||||||
* added vimparator.vim for .vimperatorrc syntax highlighting in the XPI (by Doug Kearns)
|
* added vimparator.vim for .vimperatorrc syntax highlighting in the XPI (by Doug Kearns)
|
||||||
* Added keyword support for bookmarks to the :[tab]open commands
|
* Added keyword support for bookmarks to the :[tab]open commands
|
||||||
* many small bug fixes
|
* many small bug fixes
|
||||||
|
|||||||
4
TODO
4
TODO
@@ -55,4 +55,8 @@ RANDOM IDEAS:
|
|||||||
* https://addons.mozilla.org/en-US/firefox/addon/4125 - use vim to edit text fields
|
* https://addons.mozilla.org/en-US/firefox/addon/4125 - use vim to edit text fields
|
||||||
* Would it be possible to add a setting "maxcompletionsshown" and
|
* Would it be possible to add a setting "maxcompletionsshown" and
|
||||||
"maxpreviewwindowheight" or something like this?
|
"maxpreviewwindowheight" or something like this?
|
||||||
|
* 16:06:04 bartman| maxauthority: feature idea: what if :n and :N searched the
|
||||||
|
page and if they found a unique <a href=...>.*next.*</a> or <a
|
||||||
|
href=...>.*prev.*<a/> they would follow that link?
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
@@ -184,7 +184,14 @@ var g_commands = [/*{{{*/
|
|||||||
["help", "h"],
|
["help", "h"],
|
||||||
["h[elp] {subject}"],
|
["h[elp] {subject}"],
|
||||||
"Open the help window",
|
"Open the help window",
|
||||||
"You can jump to the specified {subject} with <code class=command>:help {subject}</code>.",
|
"You can jump to the specified {subject} with <code class=command>:help {subject}</code>.<br/>"+
|
||||||
|
"Make sure you use the full vim notation when jumping to {subject}. This means:<br/>"+
|
||||||
|
"<ul>"+
|
||||||
|
"<li><code class=command>:help :help</code> for commands (: prefix)</li>"+
|
||||||
|
"<li><code class=command>:help 'complete'</code> for settings (surrounded by ' and ')</li>"+
|
||||||
|
"<li><code class=command>:help o</code> for mappings (no pre- or postfix)</li>"+
|
||||||
|
"</ul>"+
|
||||||
|
"You can however use partial stings in the tab completion, so <code class=command>:help he<Tab></code> will complete <code class=command>:help :help</code>",
|
||||||
help,
|
help,
|
||||||
function(filter) { return get_help_completions(filter); }
|
function(filter) { return get_help_completions(filter); }
|
||||||
],
|
],
|
||||||
@@ -380,13 +387,43 @@ var g_commands = [/*{{{*/
|
|||||||
function (filter) { return get_url_completions(filter); }
|
function (filter) { return get_url_completions(filter); }
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
["tabprevious", "tp", "tprev", "tprevious"],
|
["tabonly", "tabo"],
|
||||||
["tabp[revious]"],
|
["tabo[nly]"],
|
||||||
|
"Close all other tabs",
|
||||||
|
null,
|
||||||
|
function () {
|
||||||
|
tabs = getBrowser().mTabContainer.childNodes;
|
||||||
|
for (var i = tabs.length - 1; i >= 0; i--) {
|
||||||
|
if (tabs[i] != getBrowser().mCurrentTab)
|
||||||
|
getBrowser().removeTab(tabs[i]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
null
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["tabprevious", "tabp", "tp", "tprev", "tprevious", "tabNext", "tabN", "tN", "tNext"],
|
||||||
|
["tabp[revious]", "tabN[ext]"],
|
||||||
"Switch to the previous tab",
|
"Switch to the previous tab",
|
||||||
"Cycles to the last tab, when the first is selected.",
|
"Cycles to the last tab, when the first is selected.",
|
||||||
function(args, count) { tab_go(-1); },
|
function(args, count) { tab_go(-1); },
|
||||||
null
|
null
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
["tabrewind", "tabr", "tabfir", "tabfirst"],
|
||||||
|
["tabr[ewind]", "tabfir[st]"],
|
||||||
|
"Switch to the first tab",
|
||||||
|
null,
|
||||||
|
function(args, count) { tab_go(1); },
|
||||||
|
null
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["tablast", "tabl"],
|
||||||
|
["tabl[ast]"],
|
||||||
|
"Switch to the last tab",
|
||||||
|
null,
|
||||||
|
function(args, count) { tab_go(getBrowser().mTabContainer.childNodes.length); },
|
||||||
|
null
|
||||||
|
],
|
||||||
[
|
[
|
||||||
["undo", "u"],
|
["undo", "u"],
|
||||||
["{count}undo"],
|
["{count}undo"],
|
||||||
|
|||||||
@@ -355,8 +355,8 @@ function filter_url_array(urls, filter)/*{{{*/
|
|||||||
*/
|
*/
|
||||||
for (var i = 0; i < urls.length; i++)
|
for (var i = 0; i < urls.length; i++)
|
||||||
{
|
{
|
||||||
var url = urls[i][0];
|
var url = urls[i][0] || "";
|
||||||
var title = urls[i][1];
|
var title = urls[i][1] || "";
|
||||||
if(ignorecase)
|
if(ignorecase)
|
||||||
{
|
{
|
||||||
url = url.toLowerCase();
|
url = url.toLowerCase();
|
||||||
|
|||||||
@@ -194,10 +194,24 @@ function help(section, easter)
|
|||||||
'\n</td></tr></table>\n</pre></body>\n</html>';
|
'\n</td></tr></table>\n</pre></body>\n</html>';
|
||||||
|
|
||||||
|
|
||||||
doc.open();
|
try
|
||||||
|
{
|
||||||
|
doc.open();
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
// when the url is "about:" the doc is not open
|
||||||
|
// then open a new tab for it
|
||||||
|
//if (!arguments[3] || !arguments[3].inTab)
|
||||||
|
// help(section, false, {inTab: true});
|
||||||
|
openURLsInNewTab("", true);
|
||||||
|
doc = window.content.document;
|
||||||
|
doc.open();
|
||||||
|
}
|
||||||
doc.write(fulldoc);
|
doc.write(fulldoc);
|
||||||
doc.close();
|
doc.close();
|
||||||
|
|
||||||
|
|
||||||
function cumulativeOffset(element)
|
function cumulativeOffset(element)
|
||||||
{
|
{
|
||||||
var valueT = 0, valueL = 0;
|
var valueT = 0, valueL = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user