Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Gnu Emacs with Tabbar

9 views
Skip to first unread message

d0nny

unread,
May 18, 2012, 9:19:01 PM5/18/12
to
网上tabbar的配置很多没有美化,或者美化不到位。

有人在提标签的问题,就贴一个自己的出来。

[code]
(require 'tabbar)
(tabbar-mode)

;; 定义tabbar的分组
(defun tabbar-buffer-groups ()
"Return the list of group names the current buffer belongs to.
Return a list of one element based on major mode."
(list
(cond
((or (get-buffer-process (current-buffer))
;; Check if the major mode derives from `comint-mode' or
;; `compilation-mode'.
(tabbar-buffer-mode-derived-p
major-mode '(comint-mode compilation-mode)))
"Process"
)
((member (buffer-name)
'("*scratch*" "*Messages*"))
"Common"
)
((member (buffer-name)
'("gtd.org" "home.org" "other.org" "study.org" "work.org"))
"GTD"
)
((eq major-mode 'dired-mode)
"Dired"
)
((memq major-mode
'(help-mode apropos-mode Info-mode Man-mode))
"Help"
)
((memq major-mode
'(rmail-mode
rmail-edit-mode vm-summary-mode vm-mode mail-mode
mh-letter-mode mh-show-mode mh-folder-mode
gnus-summary-mode message-mode gnus-group-mode
gnus-article-mode score-mode gnus-browse-killed-mode))
"Mail"
)
(t
;; Return `mode-name' if not blank, `major-mode' otherwise.
(if (and (stringp mode-name)
;; Take care of preserving the match-data because this
;; function is called when updating the header line.
(save-match-data (string-match "[^ ]" mode-name)))
mode-name
(symbol-name major-mode))
))))

;; 设置tabbar外观
(set-face-attribute 'tabbar-default nil
:inherit nil
:weight 'normal
:width 'normal
:slant 'normal
:underline nil
:strike-through nil
;; inherit from frame :inverse-video
:stipple nil
:background "gray80"
:foreground "black"
;; :box '(:line-width 2 :color "white" :style nil)
:box nil
:family "Lucida Grande"
)
(set-face-attribute 'tabbar-selected nil
:background "gray95"
:foreground "gray20"
:inherit 'tabbar-default
:box '(:line-width 3 :color "grey95" :style nil))
;; :box '(:line-width 2 :color "white" :style released-button))
(set-face-attribute 'tabbar-unselected nil
:inherit 'tabbar-default
:background "gray80"
:box '(:line-width 3 :color "grey80" :style nil))
(defface tabbar-selected-highlight '((t
:foreground "black"
:background "gray95"))
"Face for selected, highlighted tabs."
:group 'tabbar)
(defface tabbar-unselected-highlight '((t
:foreground "black"
:background "grey75"
:box (:line-width 3 :color "grey75" :style nil)))
"Face for unselected, highlighted tabs."
:group 'tabbar)
(set-face-attribute 'tabbar-button nil
:inherit 'tabbar-default
:box nil)
(set-face-attribute 'tabbar-separator nil
:background "grey50"
:foreground "grey50"
:height 1.0)

;; 定义tabbar快捷键,在Windows上不起作用
(global-set-key (kbd "s-h") 'tabbar-backward-group)
(global-set-key (kbd "s-l") 'tabbar-forward-group)
(global-set-key (kbd "s-j") 'tabbar-backward)
(global-set-key (kbd "s-k") 'tabbar-forward)

[/code]


--

[m [31m※ 来源:·水木社区 http://newsmth.net·[FROM: 14.107.249.*] [m

歓子

unread,
May 19, 2012, 4:46:52 AM5/19/12
to
用ido后,我抛弃tabbar很久了
【 在 d0nny (d0nny) 的大作中提到: 】
: 网上tabbar的配置很多没有美化,或者美化不到位。
: 有人在提标签的问题,就贴一个自己的出来。
: [code]
: ...................

--
爷们 长一米八 宽一尺有余 材料骨骼肌肉 耐寂寞 不溶于水 内容:思想大便




qmd: http://hi.baidu.com/chunhui_true/blog/item/7d3d0a24252a3c21d407420c.html


[m [35m※ 来源:·水木社区 http://newsmth.net·[FROM: 125.39.117.*] [m

风无常

unread,
May 19, 2012, 6:37:18 AM5/19/12
to
re
且在terminal下无法使用.
【 在 chunhui (纯灰) 的大作中提到: 】
: 用ido后,我抛弃tabbar很久了


--
ngn@ngn-desktop:~$chmod 700 myfate
Permission denied


[m [1;37m※ 来源:·水木社区 newsmth.net·[FROM: 121.0.29.*] [m

蜗牛-高那么一点点

unread,
May 19, 2012, 7:13:47 AM5/19/12
to
我把它搞成了这个样子, 感觉最不影响编辑.. 另外, tabbar在terminal下是有效的
--

[upload=1][/upload]
[upload=1][/upload]
[36m※ 修改:·nowait 于 May 19 19:13:47 2012 修改本文·[FROM: 192.102.204.*] [m
[m [36m※ 来源:·水木社区 http://newsmth.net·[FROM: 192.102.204.*] [m

风无常

unread,
May 19, 2012, 12:45:52 PM5/19/12
to
在terminal有什么用?不能点击啊.
【 在 nowait (蜗牛-高那么一点点) 的大作中提到: 】
: 我把它搞成了这个样子, 感觉最不影响编辑.. 另外, tabbar在terminal下是有效的


--
ngn@ngn-desktop:~$chmod 700 myfate
Permission denied


[m [1;37m※ 来源:·水木社区 newsmth.net·[FROM: 115.193.181.*] [m

БхРА

unread,
May 20, 2012, 8:44:56 AM5/20/12
to

我记得能

【 在 ngn999 (风无常) 的大作中提到: 】
: 在terminal有什么用?不能点击啊.


--

[m [1;31m※ 来源:·水木社区 newsmth.net·[FROM: 113.234.88.*] [m
0 new messages