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

weird source .vimrc behavior

Expand Messages
  • Denis Perelyubskiy
    hello, this is not a big deal, but it bothers me a little... every time i source my .vimrc, the current buffer i am editing has the (+), and modified is set.
    Message 1 of 7 , Dec 2, 2001
    • 0 Attachment
      hello,

      this is not a big deal, but it bothers me a little...

      every time i source my .vimrc, the current buffer i am
      editing has the (+), and 'modified' is set.

      before, Benji had suggested that it was something in my
      .vimrc, and I did not have time to look into it some more,
      so I let it go.

      it would've been fine, but the behaviour is a little more
      strange: if i :bn out of the buffer, then :bn back to it,
      the (+) disappears, and 'modified' is not set anymore.

      does anyone know what causes that to happen?

      thanks,

      denis

      --
      // mailto: Denis Perelyubskiy <denisp@...>
      // icq : 12359698
      // PGP : http://www.cs.ucla.edu/~denisp/files/pgp.asc
    • Piet Delport
      ... If your vimrc isn t excessively large (not more than a couple of KB), can you post it to the list? Maybe someone here can spot what s causing this. --
      Message 2 of 7 , Dec 4, 2001
      • 0 Attachment
        On Sun, 02 Dec 2001 at 11:57:43 -0800, Denis Perelyubskiy wrote:
        >
        > this is not a big deal, but it bothers me a little...
        >
        > every time i source my .vimrc, the current buffer i am
        > editing has the (+), and 'modified' is set.
        >
        > before, Benji had suggested that it was something in my
        > .vimrc, and I did not have time to look into it some more,
        > so I let it go.
        >
        > it would've been fine, but the behaviour is a little more
        > strange: if i :bn out of the buffer, then :bn back to it,
        > the (+) disappears, and 'modified' is not set anymore.
        >
        > does anyone know what causes that to happen?

        If your vimrc isn't excessively large (not more than a couple of KB),
        can you post it to the list? Maybe someone here can spot what's causing
        this.

        --
        Piet Delport <siberiyan@...>
        Today's subliminal thought is:
      • Denis Perelyubskiy
        ... [...] ... [...] ... thanks, but apparently there is no need anymore. i feel sort of stupid :), but i had set mod in my .vimrc ... i am not too certain
        Message 3 of 7 , Dec 4, 2001
        • 0 Attachment
          * Piet Delport <siberiyan@...> [04-Dec-01 03:35 -0800]:
          >
          >On Sun, 02 Dec 2001 at 11:57:43 -0800, Denis Perelyubskiy wrote:
          [...]
          >> every time i source my .vimrc, the current buffer i am
          >> editing has the (+), and 'modified' is set.
          [...]
          >If your vimrc isn't excessively large (not more than a
          >couple of KB), can you post it to the list? Maybe
          >someone here can spot what's causing this.

          thanks, but apparently there is no need anymore. i feel sort
          of stupid :), but i had 'set mod' in my .vimrc ... i am not
          too certain why i had it there, but that sort of thing does
          exactly what it is supposed to do... oh my, and all this
          time i've been looking at that file trying to figure out
          what's wrong...

          thanks anyway,

          denis

          --
          // mailto: Denis Perelyubskiy <denisp@...>
          // icq : 12359698
          // PGP : http://www.cs.ucla.edu/~denisp/files/pgp.asc
        • Charles E. Campbell
          ... Please try searching for the difficulty using the following, admittedly brute force, technique: a) move to . Run vim. Is the buffer
          Message 4 of 7 , Dec 4, 2001
          • 0 Attachment
            On Sun, 02 Dec 2001 at 11:57:43 -0800, Denis Perelyubskiy wrote:
            > this is not a big deal, but it bothers me a little...
            >
            > every time i source my .vimrc, the current buffer i am
            > editing has the (+), and 'modified' is set.

            Please try searching for the difficulty using the following,
            admittedly brute force, technique:

            a) move <.vimrc> to <vimrc> . Run vim. Is the buffer
            modified? If it has been, the problem does not lie
            in your <.vimrc> but in a system-wide vimrc or a plugin.

            b) Assuming buffer not modifed at step a. Rename <.vimrc>
            to <vimrc>. Comment out first half of it. Run vim.
            If buffer modified, problem is in 2nd half, otherwise
            in first half.

            Keep commenting out portions of your <.vimrc> until you
            find the culprit.

            Regards,
            Dr C

            --
            Charles E Campbell, Jr, PhD _ __ __
            Goddard Space Flight Center / /_/\_\_/ /
            cec@... /_/ \/_//_/
            PGP public key: http://www.erols.com/astronaut/pgp.html
          • Benji Fisher
            ... I think this particular problem has already been solved, but for future reference: I think it is slightly simpler to skip Step a and go right to Step b.
            Message 5 of 7 , Dec 4, 2001
            • 0 Attachment
              On Tuesday, December 4, 2001, at 10:28 AM, Charles E. Campbell wrote:

              > On Sun, 02 Dec 2001 at 11:57:43 -0800, Denis Perelyubskiy wrote:
              >> this is not a big deal, but it bothers me a little...
              >>
              >> every time i source my .vimrc, the current buffer i am
              >> editing has the (+), and 'modified' is set.
              >
              > Please try searching for the difficulty using the following,
              > admittedly brute force, technique:
              >
              > a) move <.vimrc> to <vimrc> . Run vim. Is the buffer
              > modified? If it has been, the problem does not lie
              > in your <.vimrc> but in a system-wide vimrc or a plugin.
              >
              > b) Assuming buffer not modifed at step a. Rename <.vimrc>
              > to <vimrc>. Comment out first half of it. Run vim.
              > If buffer modified, problem is in 2nd half, otherwise
              > in first half.

              I think this particular problem has already been solved, but for
              future reference: I think it is slightly simpler to skip Step a and go
              right to Step b. Start out by commenting out the whole file. (:if
              0 ... :endif should do) and then start the binary search to find the
              source of the problem.

              HTH --Benji Fisher
            • Austy Garhi (n. d'i-b.)
              On Sun, 02 Dec 2001 at 11:57:43 -0800, Denis Perelyubskiy wrote: it would ve been fine, but the behaviour is a little more strange: if i :bn out of
              Message 6 of 7 , Dec 5, 2001
              • 0 Attachment
                On Sun, 02 Dec 2001 at 11:57:43 -0800, Denis Perelyubskiy wrote:
                "> > it would've been fine, but the behaviour is a little more
                "> > strange: if i :bn out of the buffer, then :bn back to it,
                "> > the (+) disappears, and 'modified' is not set anymore.
                "> >
                "> > does anyone know what causes that to happen?

                (+) appears as soon as you make any CHANGE to the edit buffer. It means:
                "something has changed".

                If you have set either 'autowrite', or 'autowriteall', AND you go to another
                window with one of the commands that 'aw' or 'awa' respond to, then the file will
                be written as soon as you step out of the window AND Vim removes the (+) status
                flag . . . which will pop up again as soon as you change anything in the file.

                ---
                __Austy Garhi__ (n. d'i-b.)

                My style of expression modeled after that of
                Sigmund Freud: ... combative ... of darkness
                ... for enlightenment.

                "We should take care not to make the intellect
                our god; it has, of course, powerful muscles,
                but no personality." --Albert Einstein
              • Denis Perelyubskiy
                ... thanks, that was a good guess. as i mentioned before, the problem was a user problem, not an editor problem :) since i somehow managed to set mod inside
                Message 7 of 7 , Dec 5, 2001
                • 0 Attachment
                  * Austy Garhi (n. d'i-b.) <tgal@...> [05-Dec-01 16:58 -0800]:
                  >
                  >On Sun, 02 Dec 2001 at 11:57:43 -0800, Denis Perelyubskiy wrote:
                  >"> > it would've been fine, but the behaviour is a little more
                  >"> > strange: if i :bn out of the buffer, then :bn back to it,
                  >"> > the (+) disappears, and 'modified' is not set anymore.
                  >"> >
                  >"> > does anyone know what causes that to happen?
                  >
                  >(+) appears as soon as you make any CHANGE to the edit buffer. It means:
                  >"something has changed".
                  >
                  >If you have set either 'autowrite', or 'autowriteall',
                  >AND you go to another window with one of the commands
                  >that 'aw' or 'awa' respond to, then the file will be
                  >written as soon as you step out of the window AND Vim
                  >removes the (+) status flag . . . which will pop up again
                  >as soon as you change anything in the file.

                  thanks, that was a good guess. as i mentioned
                  before, the problem was a user problem, not an editor
                  problem :) since i somehow managed to 'set mod' inside the
                  .vimrc.... however, now that i went back and checked, it
                  does appear that i have autowrite on, which explains the
                  rest of the behavior (+)-disappearance ...

                  thanks,

                  denis

                  --
                  // mailto: Denis Perelyubskiy <denisp@...>
                  // icq : 12359698
                  // PGP : http://www.cs.ucla.edu/~denisp/files/pgp.asc
                Your message has been successfully submitted and would be delivered to recipients shortly.