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

Re: Surround active bufer with higlight

Expand Messages
  • Paul Isambert
    ... I don t think that s possible. However, perhaps the following (which might be improved) will suit your needs; it uses ColorColumn to change the background
    Message 1 of 5 , Feb 2, 2012
    • 0 Attachment
      Rich Healey <healey.rich@...> a écrit:
      >
      > When I have my window split with many buffers, the title line on the active
      > pane is a different color, but is it possible to have all 4 borders of the
      > current split different the way tmux et al does?

      I don't think that's possible. However, perhaps the following (which
      might be improved) will suit your needs; it uses ColorColumn to change
      the background color of inactive windows (of course you'll need ColorColumn
      suitably set; darker than Normal would be good, I suppose), so the
      current window seems highlighted (it would be better still to set NonText
      too):


      function! s:SetCurrentWindow()
      for i in range(1, tabpagewinnr(tabpagenr(), '$'))
      let l:range = ""
      if i != winnr()
      for j in range(1, winwidth(i))
      let l:range = l:range . j . ","
      endfor
      let l:range = substitute(l:range, ',$', '', '')
      endif
      call setwinvar(i, '&cc', l:range)
      endfor
      endfunction

      au WinEnter * call s:SetCurrentWindow()


      Best,
      Paul

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • John Little
      ... Sounds like your cursor is insufficiently conspicuous. If you re using gvim, see :h guicursor. I have set
      Message 2 of 5 , Feb 2, 2012
      • 0 Attachment
        On Feb 2, 4:47 pm, Rich Healey <healey.r...@...> wrote:
        >
        > Sometimes when I have many splits I find it hard to find where I left my
        > focus.

        Sounds like your cursor is insufficiently conspicuous. If you're
        using gvim, see :h guicursor. I have

        set guicursor=n-c:hor20,v:hor25,ve:ver35,o:hor50,i-ci:ver25,
        \r-cr:hor35-ErrorMsg,sm:block
        " this looks odd, but it works; the second setting of guicursor does
        not undo
        " the previous settings
        set guicursor=a:blinkwait200-blinkon200-blinkoff200

        Otherwise, your terminal emulator may have possibilities. F. ex,

        xterm -bc -bcf 200 -bcn 200 -cr red

        or have a look in the wiki: http://vim.wikia.com/wiki/Configuring_the_cursor

        Regards, John

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Christian Brabandt
        ... May be just as simple as: au WinEnter * :set cul au WinLeave * :set nocul regards, Christian -- You received this message from the vim_use maillist. Do
        Message 3 of 5 , Feb 2, 2012
        • 0 Attachment
          On Thu, February 2, 2012 04:47, Rich Healey wrote:
          > When I have my window split with many buffers, the title line on the
          > active
          > pane is a different color, but is it possible to have all 4 borders of the
          > current split different the way tmux et al does?
          >
          > Sometimes when I have many splits I find it hard to find where I left my
          > focus.
          May be just as simple as:

          au WinEnter * :set cul
          au WinLeave * :set nocul

          regards,
          Christian

          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Rich Healey
          Thanks all for your replies. I m going to experiment with all 3 approaches today and see which I prefer. -- You received this message from the vim_use
          Message 4 of 5 , Feb 2, 2012
          • 0 Attachment
            Thanks all for your replies. I'm going to experiment with all 3 approaches today and see which I prefer.

            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          Your message has been successfully submitted and would be delivered to recipients shortly.