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

Re: status line changes when xpt plugin is in path

Expand Messages
  • Matt Wozniski
    ... should confirm that xpt is mangling it. If it is, you should probably be able to get around it with an autocmd that just resets statusline to the default
    Message 1 of 5 , Sep 30, 2009
    • 0 Attachment
      On Wed, Sep 30, 2009 at 1:39 AM, Harry Putnam wrote:
      >
      > I've been going round and round with the status line and ruler
      > setting.
      >
      > I have these in .vimrc
      >
      > set ruler
      > set laststatus=0
      >
      > If I start vim I see a
      > nice:                  36,1           6%
      >
      > Or what ever percentage I'm at.
      >
      > However I do nothing more than put the xpt plugin into my path, when I
      > start vim the status line has changed
      >    to:               <1           top
      >
      > And if I scroll down far enough to get a percent it shows:
      >                      <,1            2%
      >
      > The line number has been changed to `<'.
      >
      > I want to try using the xpt plugin but I want my normal status line
      > with line number, column number, percent.
      >
      > Is there something wrong here or can I set something in .vimrc that
      > will make the statusline show line,column and percent whether xpt is
      > in my path or not?
      >
      > I'm pretty sure its xpt causing the trouble.
      >
      > My test is to start vim without xpt in ~/.vim
      >
      > Then start vim after unpacking xpt into ~/.vim ... and the status line
      > is changed.  And I can repeat it every time.

      :verbose set statusline?

      should confirm that xpt is mangling it.

      If it is, you should probably be able to get around it with an autocmd
      that just resets 'statusline' to the default value after xpt has
      already been loaded. For example,

      autocmd VimEnter * :set statusline&

      ~Matt

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Harry Putnam
      ... How can I know when xpt has already loaded? Are plugins loaded after vimrc is read? ... Thanks, that looks useful Is it normal for a plugin to reset the
      Message 2 of 5 , Sep 30, 2009
      • 0 Attachment
        Matt Wozniski <mjw@...> writes:

        >> I'm pretty sure its xpt causing the trouble.
        >>
        >> My test is to start vim without xpt in ~/.vim
        >>
        >> Then start vim after unpacking xpt into ~/.vim ... and the status line
        >> is changed.  And I can repeat it every time.
        >
        > :verbose set statusline?
        >
        > should confirm that xpt is mangling it.
        >
        > If it is, you should probably be able to get around it with an autocmd
        > that just resets 'statusline' to the default value after xpt has
        > already been loaded. For example,

        How can I know when xpt has already loaded? Are plugins loaded after
        vimrc is read?

        > autocmd VimEnter * :set statusline&

        Thanks, that looks useful

        Is it normal for a plugin to reset the status line? I'm not an
        experienced plugin user...

        Or is it likely to be some kind of error or bad code inside xpt?

        Changing the ruler portion of statusline from:

        Line number,column percent of file
        8,4 %16
        ... to
        <,4 %16

        doesn't look very useful. It looks suspiciously like an error or
        mistake of some kind.

        Oh Oh, I just opened vim on .vimrc. I see the messed up status line.

        I put your suggestion (autocmd VimEnter * :set statusline&)at the
        bottom of .vimrc... saved... didn't close vim but instead just
        resourced .vimrc....

        However, the status line did not change. Its still messed up.

        I used the command you suggested at that point:

        :verbose set statusline (and it shows)

        statusline=%<%f %h%m%r%= %P%{XPMautoUpdate("statusline")}
        Last set from ~/.vim/xpt/plugin/xpmark.vim

        Just putting `autocmd VimEnter * :set statusline&' at the end of
        .vimrc and re-sourcing it... without restarting vim doesn't fix the
        statusline. But restarting vim with
        `autocmd VimEnter * :set statusline&' at the end... and the status
        line is fixed.

        Good... but I don't understand why resourcing .vimrc or manually
        calling: :set statusline& with vim running doesn't repair whatever
        xpt is doing.



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • sc
        ... harry -- take a deep breath, pause, and think the VimEnter autocommands are triggered when you start vim, not when you re-source .vimrc sc
        Message 3 of 5 , Sep 30, 2009
        • 0 Attachment
          On Wednesday 30 September 2009, Harry Putnam wrote:

          > Good... but I don't understand why resourcing .vimrc or
          > manually calling: :set statusline&  with vim running
          > doesn't repair whatever xpt is doing.

          harry -- take a deep breath, pause, and think

          the VimEnter autocommands are triggered when you start vim,
          not when you re-source .vimrc

          sc

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Harry Putnam
          ... Gasp, heart rate slowing.... I see... thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist.
          Message 4 of 5 , Sep 30, 2009
          • 0 Attachment
            sc <toothpik@...> writes:

            >> Good... but I don't understand why resourcing .vimrc or
            >> manually calling: :set statusline&  with vim running
            >> doesn't repair whatever xpt is doing.
            >
            > harry -- take a deep breath, pause, and think
            >
            > the VimEnter autocommands are triggered when you start vim,
            > not when you re-source .vimrc

            Gasp, heart rate slowing....
            I see... thanks.


            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.