[Vimperator] tabcloseext plugin

Konstantin milezv at yandex.ru
Wed Jul 9 15:38:42 PDT 2008


Hi,

Martin Stubenschrott wrote:
> Hi,
> 
> Konstantin wrote:
> 
>> Hi, All,
>>
>> This plugin adds two commands to close all tabs with given text in URL/title (tabcloseall),
>> or leave only tabs with given text in URL/title (tabonlyall).
> 
> Probably the most important action (deleting multiple tabs) can be done since recent CVS
> versions with:
> :bdelete <filter>

Just noticed this, thanks for telling about it.
Yes, :tabclose/:bdelete works just like :tabcloseall from my plugin.

> 
> Proabably :reload should also take a <filter> argument, then most of this plugin wouldn't
> be necessary anymore, and the commands be more consistent within. Maybe <filter> could
> be expanded to use ! as a negator, so :bdelete !google would close all but google's tabs.

I would add filter to :reload, and to :tabonly to leave only filtered pages.

> If you feel capable (and motivated), to do these changes to the extisting commands, I would
> even apply them to the main vimperator, and no plugin would be needed anymore (I think).

I'm in process of changing job, so I don't have much free time now,
but this feature is really important for me, so I will try to implement it soon.

> Otherwise, I hope the people here enjoy your plugin or use it as an example how to code
> vimperator plugins.

N.B. Just thought about it: commands implemented in tabcloseext plugin
use "!" notation to designate regexp usage for filters, but :bdelete, :tabonly
& :reload already use it, and it wouldn't be very nice to change their behavior.
I would either implement filtering with regular expressions only or check if
filter string is inclosed in e.g. "/" symbols, so
:tabclose google.com
filters tabs by simple string comparison via .indexOf method, and
:tabclose /google\.com.*q=query/
interprets its argument as regexp and filters tabs with this regular expression.


> best regards,
> 
> --
> Martin
> _______________________________________________
> Vimperator mailing list
> Vimperator at mozdev.org
> https://www.mozdev.org/mailman/listinfo/vimperator
> 

-- 
Konstantin Stepanov
Web Developer




More information about the Vimperator mailing list