diff --git a/common/content/tabs.js b/common/content/tabs.js index c67b442f..a1158fd5 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -359,6 +359,22 @@ function Tabs() //{{{ literal: 0 }); + commands.add(["tabd[o]", "bufd[o]"], + "Execute a command in each tab", + function (args) + { + for (let i = 0; i < tabs.count; i++) + { + tabs.select(i); + liberator.execute(args.string); + } + }, + { + argCount: "1", + completer: function (context) completion.ex(context), + literal: 0 + }); + commands.add(["tabl[ast]", "bl[ast]"], "Switch to the last tab", function () tabs.select("$", false), diff --git a/vimperator/NEWS b/vimperator/NEWS index 0b50f06f..3a3191b8 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -2,12 +2,14 @@ * version 2.1 * massively speed up :open completions * TabMixPlus (and other tab extensions) should work much better now - together with vimperator unless you :set guioptions+=[nN] + together with Vimperator unless you :set guioptions+=[nN] * remove 'preload' option. You can fake it by some custom javascript in your init file + * add :tabdo * add 'encoding' * add 'hintinputs' * add :silent * add $MY_VIMPERATORRC // TODO: I still don't like this --mst + You're yet to explain why... --djk * add ' and " local marks * add "w" and "W" Normal mode mappings for symmetry with o/O and t/T * add :messclear diff --git a/vimperator/contrib/vim/syntax/vimperator.vim b/vimperator/contrib/vim/syntax/vimperator.vim index 0ca0ae1c..eba34e59 100644 --- a/vimperator/contrib/vim/syntax/vimperator.vim +++ b/vimperator/contrib/vim/syntax/vimperator.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: VIMperator configuration file " Maintainer: Doug Kearns -" Last Change: 2009 Feb 19 +" Last Change: 2009 Apr 30 if exists("b:current_syntax") finish @@ -19,7 +19,7 @@ unlet b:current_syntax syn match vimperatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=vimperatorCommand,vimperatorAutoCmd syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] bN[ext] b[uffer] ba[ck] bd[elete] beep bf[irst] bl[ast] bma[rk] - \ bmarks bn[ext] bp[revious] br[ewind] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] + \ bmarks bn[ext] bp[revious] br[ewind] buffers bufd[o] bun[load]bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] \ cno[remap] colo[rscheme] com[mand] comc[lear] cu[nmap] cuna[bbrev] delbm[arks] delc[ommand] delm[arks] delmac[ros] \ delqm[arks] dels[tyle] dia[log] dl do[autocmd] doautoa[ll] downl[oads] e[dit] ec[ho] echoe[rr] echom[sg] em[enu] exe[cute] \ exu[sage] files fini[sh] fo[rward] fw h[elp] ha[rdcopy] hi[ghlight] hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] @@ -27,8 +27,8 @@ syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] bN[ext] b[uffer] b \ 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 - \ tabN[ext] tabc[lose] tabd[uplicate] tabde[tach] 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] + \ 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] \ contained diff --git a/vimperator/locale/en-US/tabs.txt b/vimperator/locale/en-US/tabs.txt index 5a717cbb..8f19414a 100644 --- a/vimperator/locale/en-US/tabs.txt +++ b/vimperator/locale/en-US/tabs.txt @@ -134,6 +134,7 @@ ________________________________________________________________________________ Detach the current tab, and open it in its own window. ________________________________________________________________________________ +section:Reordering{nbsp}tabs[reordering-tabs] |:tabm| |:tabmove| ||:tabm[ove] [a][N][a]|| + @@ -175,8 +176,6 @@ Switch to the previous tab or go [count] tabs back. Wraps around from the first tab to the last tab. ________________________________________________________________________________ - - section:Closing{nbsp}tabs[closing-tabs] |d| |:tabc| |:tabclose| |:bun| |:bunload| |:bw| |:bwipeout| |:bd| |:bdelete| @@ -215,4 +214,17 @@ Undo closing of all closed tabs. Firefox stores up to 10 closed tabs, even after a browser restart. ________________________________________________________________________________ + +section:Looping{nbsp}over{nbsp}tabs[looping-over-tabs] + +|:tabd| |:tabdo| |:bufd| |:bufdo| + +||:tabd[o] {cmd}|| +________________________________________________________________________________ +Execute {cmd} in each tab. {cmd} is executed in each tab starting with the +first and ending with the last which becomes the current tab. + +{cmd} should not alter the tab list state by adding, removing or reordering +tabs. +________________________________________________________________________________ + // vim: set filetype=asciidoc: