[Vimperator] Vimperator - relative tab movement and tabsearch patch
Martin Stubenschrott
stubenschrott at gmx.net
Tue May 22 18:30:25 PDT 2007
On Tue, May 22, 2007 at 10:09:15PM +1000, Doug Kearns wrote:
> I've also left some comments in there to remind me to look at some
> sort of command argument parser. Having to handle ex-command args all
> over the place is grossing me out. ;-)
I am sorry, but I really thought that handling of relative strings
should be in the tabs API. In my opinion the big difference between the
API and the ex-commands is, that e.g. the Tabs() api should just return
true/false/null etc. (or maybe exceptions?) which can then be checked by
a caller like the ex-commands to show an error message.
The API is designed for quick an easy vimperator plugin writing in
future, and it doesn't make sense to me, that the plugin author has to
either use the ex-command or even doing some manual calculations to
select the next tab. Therefore I decided that the
vimperator.tabs.{move/select} methods should have a logic to handle
"[+-]num" arguments.
Apart from that, the Tabs() API seems quite finished for me, probably we
should add a vimperator.tabs.add(...) function, and allow indices
instead of tabs objects in the various functions.
Also the remove method will later be changed to return true/false wheter
the tab could be removed. This return value would then be checked by a
vimperator.commands.quit() ex-command and then vimperator be quit in
case of the last tab.
I am not really sure, if we need the index() and count() methods, but I
thought, the vimperator-plugin writer should not have to deal with
firefox methods at all, but can rely that all important features can be
accessed from the vimperator API.
Please complain about missing/wrongly-named, etc. methods now.
CC'ed to the ML if others want to comment on the Tabs() API.
--
Martin
More information about the Vimperator
mailing list