假设我将我的Emacs窗口拆分为多个图块,例如:
---------------------------
| | |
| | |
---------------------------
| |
| |
---------------------------
Run Code Online (Sandbox Code Playgroud)
当我在瓷砖(也就是Emacs中的窗口)之间切换以编辑我的文件(例如使用C-x o)时,我可以通过在屏幕上直观地找到光标(点)并检查状态栏中的阴影区别来查看我在哪个瓷砖上.每个瓷砖:
但是,将光标定位在大屏幕上并不容易,并且光标所在状态栏上的阴影差异几乎可以忽略不计:
这是选择相应窗口时状态栏的样子:

这是未选择相应窗口时的样子(注意绿色有点暗)

以上是与颜色主题zenburn在GNU Emacs的23.3.1.
我的问题是:有没有办法让Emacs更清楚地指出哪个窗口/磁贴/缓冲区是具有焦点的窗口/磁贴/缓冲区?
Chr*_*han 22
绝对!
您可以使用.emacs中的以下内容更改模式行以突出显示活动栏(更改颜色和样式以适合您的偏好).
(set-face-attribute 'mode-line
nil
:foreground "gray80"
:background "gray25"
:box '(:line-width 1 :style released-button))
(set-face-attribute 'mode-line-inactive
nil
:foreground "gray30"
:background MY_BG_COLOR
:box '(:line-width 1 :style released-button))
Run Code Online (Sandbox Code Playgroud)
因为看起来你正在使用Zenburn颜色主题,你也可以在那里修复它.只需在名为zenburn.el的颜色主题库中打开文件(或者它可能是color-theme-zenburn.el)并搜索以下行:
`(mode-line
((,class (:foreground ,zenburn-green+1
:background ,zenburn-bg-1
:box (:line-width -1 :style released-button)))))
`(mode-line-buffer-id ((,class (:foreground ,zenburn-yellow :weight bold))))
`(mode-line-inactive
((,class (:foreground ,zenburn-green-1
:background ,zenburn-bg-05
:box (:line-width -1 :style released-button)))))
Run Code Online (Sandbox Code Playgroud)
并根据需要更改背景颜色和前景色的值.