tags:

views:

132

answers:

4

I usually work fullscreen with Vim and Emacs on a 30" monitor which means I tend to have a lot of splits. The active pane's modeline changes background in Vim and Emacs, but sometimes that's not an easy to see indicator of the active pane.

Is there a way to change the background color of the active pane so I can easily, at a glance, see what split I'm currently in?

Either Vim or Emacs solution would be fine.

A: 

For Emacs, you cannot do this. You can change the background for a frame only.

See the related questions:

One option could be to use a tiling window manager, and use a bunch of different Emacs frames. And then you can use the FrameMove package to easily move between the frames.

Trey Jackson
Tiling window managers would certainly be a way, but I'm on OS X :/
thedz
@thedz You could always tile them manually. :)
Trey Jackson
A: 

There are color schemes in Vim which make the status line really pop out. That's not exactly what you're looking for, but you may be able to make it work. Play with the built in colorschemes in a window with a lot of splits (and filetypes) and you can see the effects. I remember thinking that one in particular was god awful due to the change of the status line color, from inverse colors to something with bright yellow text in the active window. I hated it overall but one of these days will incorporate something like that into my own colorscheme.

dash-tom-bang
+1  A: 

Vim is no different from Emacs in that the actual background color can't be changed within overall application window, all the "windows" in Vim must have same background. As dash-tom-bang says, though, the status line can be used to give some visual cue to which window is active. This is done by using the 'highlight' command to set the StatusLine and StatusLineNC highlight groups to have different colors, active window will have status line with color of 'StatusLine' highlight, and all other windows will have the 'No Cursor' StatusLineNC highlight.

There is also the txtfmt plugin, which (despite some misleading screenshots) doesn't really let you have different backgrounds, but it can be useful to give some added diferentiating to windows, a little clunky by requiring you to add marker characters into your text: http://www.txtfmt.webs.com/

Herbert Sitz
+1  A: 

How about customizing the color of your active mode-line?

M-x customize-face RET mode-line 

Change the background to "red" and the foreground to "white", and you won't be able to focus on anything else except you active buffer:)

VitoshKa