mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 09:17:58 +01:00
Add :stopall.
This commit is contained in:
@@ -254,14 +254,8 @@ function Buffer() //{{{
|
||||
});
|
||||
|
||||
mappings.add(myModes, ["<C-c>"],
|
||||
"Stop loading",
|
||||
function ()
|
||||
{
|
||||
if (config.stop)
|
||||
config.stop();
|
||||
else
|
||||
window.BrowserStop();
|
||||
});
|
||||
"Stop loading the current web page",
|
||||
function () { tabs.stop(getBrowser().mCurrentTab); });
|
||||
|
||||
// scrolling
|
||||
mappings.add(myModes, ["j", "<Down>", "<C-e>"],
|
||||
@@ -430,7 +424,7 @@ function Buffer() //{{{
|
||||
|
||||
// reloading
|
||||
mappings.add(myModes, ["r"],
|
||||
"Reload current page",
|
||||
"Reload the current web page",
|
||||
function () { tabs.reload(getBrowser().mCurrentTab, false); });
|
||||
|
||||
mappings.add(myModes, ["R"],
|
||||
@@ -592,7 +586,7 @@ function Buffer() //{{{
|
||||
});
|
||||
|
||||
commands.add(["re[load]"],
|
||||
"Reload current page",
|
||||
"Reload the current web page",
|
||||
function (args) { tabs.reload(getBrowser().mCurrentTab, args.bang); },
|
||||
{
|
||||
bang: true,
|
||||
@@ -642,14 +636,8 @@ function Buffer() //{{{
|
||||
});
|
||||
|
||||
commands.add(["st[op]"],
|
||||
"Stop loading",
|
||||
function ()
|
||||
{
|
||||
if (config.stop)
|
||||
config.stop();
|
||||
else
|
||||
window.BrowserStop();
|
||||
},
|
||||
"Stop loading the current web page",
|
||||
function () { tabs.stop(getBrowser().mCurrentTab); },
|
||||
{ argCount: "0" });
|
||||
|
||||
commands.add(["vie[wsource]"],
|
||||
|
||||
@@ -527,6 +527,11 @@ function Tabs() //{{{
|
||||
bang: true
|
||||
});
|
||||
|
||||
commands.add(["stopa[ll]"],
|
||||
"Stop loading all tab pages",
|
||||
function () { tabs.stopAll(); },
|
||||
{ argCount: "0" });
|
||||
|
||||
// TODO: add count support
|
||||
commands.add(["tabm[ove]"],
|
||||
"Move the current tab after tab N",
|
||||
@@ -886,6 +891,13 @@ function Tabs() //{{{
|
||||
getBrowser().mTabContainer.selectedIndex = index;
|
||||
},
|
||||
|
||||
/**
|
||||
* Reload the specified tab.
|
||||
*
|
||||
* @param {Object} tab The tab to reload.
|
||||
* @param {boolean} bypassCache Whether to bypass the cache when
|
||||
* reloading.
|
||||
*/
|
||||
reload: function (tab, bypassCache)
|
||||
{
|
||||
if (bypassCache)
|
||||
@@ -899,6 +911,12 @@ function Tabs() //{{{
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Reload all tabs.
|
||||
*
|
||||
* @param {boolean} bypassCache Whether to bypass the cache when
|
||||
* reloading.
|
||||
*/
|
||||
reloadAll: function (bypassCache)
|
||||
{
|
||||
if (bypassCache)
|
||||
@@ -922,6 +940,28 @@ function Tabs() //{{{
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop loading the specified tab.
|
||||
*
|
||||
* @param {Object} tab The tab to stop loading.
|
||||
*/
|
||||
stop: function (tab)
|
||||
{
|
||||
if (config.stop)
|
||||
config.stop(tab);
|
||||
else
|
||||
tab.linkedBrowser.stop();
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop loading all tabs.
|
||||
*/
|
||||
stopAll: function ()
|
||||
{
|
||||
for (let [,browser] in this.browsers)
|
||||
browser.stop();
|
||||
},
|
||||
|
||||
// "buffer" is a string which matches the URL or title of a buffer, if it
|
||||
// is null, the last used string is used again
|
||||
switchTo: function (buffer, allowNonUnique, count, reverse)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* TabMixPlus (and other tab extensions) should work much better now
|
||||
together with Vimperator unless you :set guioptions+=[nN]
|
||||
* remove 'preload' option. You can fake it by some custom javascript in your init file
|
||||
* add :stopall
|
||||
* add :tabdo
|
||||
* add 'encoding'
|
||||
* add 'hintinputs'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: VIMperator configuration file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2009 Apr 30
|
||||
" Last Change: 2009 May 11
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -26,7 +26,7 @@ syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] bN[ext] b[uffer] b
|
||||
\ ino[remap] iu[nmap] iuna[bbrev] javas[cript] js ju[mps] let loadplugins lpl ls ma[rk] macros map mapc[lear] marks mes[sages]
|
||||
\ mkv[imperatorrc] no[remap] noh[lsearch] norm[al] o[pen] optionu[sage] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences]
|
||||
\ prefs pw[d] q[uit] qa[ll] qma[rk] qmarks quita[ll] re[draw] re[load] reloada[ll] res[tart] run runt[ime] sav[eas] sb[ar]
|
||||
\ sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] sty[le] tN[ext] t[open] tab
|
||||
\ sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] stopall sty[le] tN[ext] t[open] tab
|
||||
\ tabN[ext] tabc[lose] tabd[uplicate] tabde[tach] tabd[o] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew tabo[nly]
|
||||
\ tabopen tabp[revious] tabr[ewind] tabs time tn[ext] tp[revious] u[ndo] una[bbreviate] undoa[ll] unl[et] unm[ap] ve[rsion]
|
||||
\ vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wq wqa[ll] xa[ll] zo[om]
|
||||
|
||||
@@ -240,22 +240,22 @@ section:Reloading[reloading]
|
||||
|r|
|
||||
||r||
|
||||
________________________________________________________________________________
|
||||
Force reloading of the current page.
|
||||
Force reloading of the current web page.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|R|
|
||||
||R||
|
||||
________________________________________________________________________________
|
||||
Force reloading of the current page skipping the cache.
|
||||
Force reloading of the current web page skipping the cache.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|:re| |:reload| +
|
||||
||:re[load][!]||
|
||||
________________________________________________________________________________
|
||||
Reload current page. Forces reloading of the current page. If [!] is
|
||||
given, skip the cache.
|
||||
Reload current web page. Forces reloading of the current page. If [!] is given,
|
||||
skip the cache.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
@@ -277,7 +277,13 @@ ________________________________________________________________________________
|
||||
|:st| |:stop|
|
||||
||:st[op]||
|
||||
________________________________________________________________________________
|
||||
Stop loading. Stop loading current web page.
|
||||
Stop loading the current web page.
|
||||
________________________________________________________________________________
|
||||
|
||||
|:stopa| |:stopall| +
|
||||
||:stopa[ll]||
|
||||
________________________________________________________________________________
|
||||
Stop loading all web pages.
|
||||
________________________________________________________________________________
|
||||
|
||||
section:Writing[writing,save-file]
|
||||
|
||||
@@ -14,7 +14,7 @@ section:Normal{nbsp}mode[normal-index]
|
||||
||[m]<C-^>[m]|| Select the alternate tab or the [count]th tab +
|
||||
||[m]<C-a>[m]|| Increment last number in URL +
|
||||
||[m]<C-b>[m]|| Scroll up a full page +
|
||||
||[m]<C-c>[m]|| Stop loading +
|
||||
||[m]<C-c>[m]|| Stop loading the current web page +
|
||||
||[m]<C-d>[m]|| Scroll window downwards in the buffer +
|
||||
||[m]<C-f>[m]|| Scroll down a full page +
|
||||
||[m]<C-g>[m]|| Print the current file name +
|
||||
@@ -66,7 +66,7 @@ section:Normal{nbsp}mode[normal-index]
|
||||
||[m]o[m]|| Open one or more URLs +
|
||||
||[m]p[m]|| Open (put) a URL based on the current clipboard contents in the current buffer +
|
||||
||[m]q[m]|| Record a key sequence into a macro +
|
||||
||[m]r[m]|| Reload current page +
|
||||
||[m]r[m]|| Reload the current web page +
|
||||
||[m]t[m]|| Open one or more URLs in a new tab +
|
||||
||[m]u[m]|| Undo closing of a tab +
|
||||
||[m]y[m]|| Yank current location to the clipboard +
|
||||
@@ -222,7 +222,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
|
||||
||[c]:quit[c]|| Quit current tab +
|
||||
||[c]:quitall[c]|| Quit Vimperator +
|
||||
||[c]:redraw[c]|| Redraw the screen +
|
||||
||[c]:reload[c]|| Reload current page +
|
||||
||[c]:reload[c]|| Reload the current web page +
|
||||
||[c]:reloadall[c]|| Reload all tab pages +
|
||||
||[c]:restart[c]|| Force the browser to restart +
|
||||
||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' +
|
||||
@@ -236,7 +236,8 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
|
||||
||[c]:silent[c]|| Execute a command silently +
|
||||
||[c]:style[c]|| Style Vimperator and web sites +
|
||||
||[c]:source[c]|| Read Ex commands from a file +
|
||||
||[c]:stop[c]|| Stop loading +
|
||||
||[c]:stop[c]|| Stop loading the current web page +
|
||||
||[c]:stopall[c]|| Stop loading all tab pages +
|
||||
||[c]:tab[c]|| Execute a command and tell it to output in a new tab +
|
||||
||[c]:tabdo[c]|| Execute a command in each tab +
|
||||
||[c]:tabdetach[c]|| Detach current tab to its own window +
|
||||
|
||||
@@ -174,7 +174,8 @@ const config = { //{{{
|
||||
"library.js"
|
||||
],
|
||||
|
||||
stop: function ()
|
||||
// FIXME: tab arg and media tab exception?
|
||||
stop: function (tab)
|
||||
{
|
||||
SBGetBrowser().mCurrentBrowser.stop();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user