emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tab bar (was: Neat features in Eclipse editor)


From: Juri Linkov
Subject: Tab bar (was: Neat features in Eclipse editor)
Date: Sun, 06 Apr 2008 23:52:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

I just created a small experimental Emacs Lisp library that emulates the
tab bar feature provided by most modern web browsers, file managers and
editors.  Tabs are very popular nowadays mostly due to their ability
to group units equivalent to Emacs frames into one frame and providing
handles to switch them quickly inside one frame without having to switch
top-level frames.

Below is a screenshot how this feature currently looks in Emacs:

PNG image

A graphical tab bar has two special buttons: on the left side to create
a new tab, and on the right side to close the current tab.  Between them
there is a row of tabs that represent different window configurations.
The name of the tab is the name of the current buffer (just as the name
of the current frame is the name of the current buffer), but a full list
of names of all buffers in a window configuration is displayed in
a pop-up window over the tab.  Clicking the left mouse button switches
between displayed tabs.  The current tab is disabled since there is no
sense to clink it, and also this provides the visual feedback for the
currently selected tab.

There is also a menu "Tabs" that duplicates the tab bar and can be used
on non-graphical terminals.  It binds `C-z t' to the command that
creates a new tab, and `C-z c' to the command that closes the current tab.
`C-z' with a number selects the corresponding tab.  The original command
`suspend-frame' is rebound to `C-z C-z'.

PNG image

So far I'm satisfied with this feature because it implements the
intuitive and natural behavior expected from the modern tab bar.

As for details of the implementation, it currently depends on the
availability of the external program `convert' used to render the tab
bar elements.  I hope it could be replaced with a separate bar similar
to the tool-bar.  I think we should do this as soon as possible because
this single feature can improve Emacs usability for most users that expect
a tab bar is a standard editor feature.

Attachment: tab-bar.el
Description: application/emacs-lisp

-- 
Juri Linkov
http://www.jurta.org/emacs/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]