Loading ...
Sorry, an error occurred while loading the content.
 

Re: "iluminating" the active window

Expand Messages
  • Charles E. Campbell, Jr.
    ... Hello! The status line changes color based on which window is active. I myself use the following option settings for that: set laststatus=2 if
    Message 1 of 3 , Jan 27, 2006
      Carlos Beltran wrote:

      >...It would be very useful if I could somehow highlight the active window (that
      >in which I working on). Probably, it could be enough to simply slightly
      >change the vim background only for that window.
      >
      >
      Hello!

      The status line changes color based on which window is active. I myself
      use the following option settings for that:

      set laststatus=2
      if has("win32")
      set stl=%1*%f%2*\ %h%m%r%0*%=%-14.(%l,%c%V%)%<\ %P\
      Win%{winnr()}:%{winwidth(0)}x%{winheight(0)}\ %<%{strftime(\"%a\ %b\
      %d,\ %Y,\ %I:%M:%S\ \%p\")}
      else
      set stl=%1*%f%2*\ %h%m%r%0*%=%-14.(%l,%c%V%)%<\ %P\
      Win%{winnr()}:%{winwidth(0)}x%{winheight(0)}\ %<%{strftime(\"%a\ %b\
      %d,\ %Y,\ %I:%M:%S\ \%p\")}
      endif

      Regards,
      Chip Campbell
    • iler_ml@fastmail.fm
      ... Hello Beltran You can press and use following mapping to have 1-second visual highlight of the active window. This highlight won t change current
      Message 2 of 3 , Jan 27, 2006
        "Carlos Beltran" <cbeltran@...> wrote:
        > It would be very useful if I could somehow highlight the active window
        > (that
        > in which I working on). Probably, it could be enough to simply slightly
        > change the vim background only for that window.

        Hello Beltran
        You can press <F12> and use following mapping to have 1-second
        visual highlight of the active window. This highlight won't
        change current cursor position:

        "1-second-long visual highlight of the current window
        " cursor position is not moved
        :map <F12> :match ErrorMsg /./<bar>:redraw<cr>:sleep 1<cr>:match<cr>

        Yakov
        --

        iler_ml@...

        --
        http://www.fastmail.fm - Same, same, but differentÂ…
      • A. J. Mechelynck
        ... What I use is changing the colour of the status line for the current window. By default, it is bold-inverse while all other status lines are
        Message 3 of 3 , Jan 27, 2006
          Carlos Beltran wrote:
          > Hello all,
          >
          > I usually work with several windows. It happens also that I change
          > frequently the working window editing here and there. It also happens that I
          > am frequently interrupted by some college or by a phone call, and then, when
          > I have to go back to the code I am momentarily lost and I have difficulties
          > to find the window I was working with.
          >
          > It would be very useful if I could somehow highlight the active window (that
          > in which I working on). Probably, it could be enough to simply slightly
          > change the vim background only for that window.
          >
          > Do you have any idea how I can do this?
          >
          > Thank you.
          >
          > Carlos Beltran.


          What I use is changing the colour of the status line for the current
          window. By default, it is bold-inverse while all other status lines are
          nonbold-inverse. This may make it a little hard to spot. I set my
          current status line to bold white on red, which makes it radically
          different from the nonbold-inverse (i.e., white on black, in gvim) in
          the other windows. I'm attaching my "almost-default" colorscheme. Drop
          it in $HOME/vimfiles/colors (on Windows) or $HOME/.vim/colors (on Unix),
          change it to your liking (the StatusLine highlight is what governs the
          color of the current window's status line; you may want to add cterm
          highlight settings to it), then make it work by adding the line

          colorscheme almost-default

          to your vimrc.


          Best regards,
          Tony.
        Your message has been successfully submitted and would be delivered to recipients shortly.