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

Vim 7.3 - Odd behaviour with Log file ESC sequences

Expand Messages
  • Philip Rhoades
    People, Vim is displaying the same file differently and behaving differently when the file is in different directories: In:
    Message 1 of 6 , Jun 23, 2013
    • 0 Attachment
      People,

      Vim is displaying the same file differently and behaving differently
      when the file is in different directories:

      In:

      rails_dir/rails_app/log/development.log

      Vim processes the ESC sequences as normal to give coloured text but the
      command "1G" does not work - but if I copy the file with "cp -a ":

      rails_dir/development.log

      the ESC sequences show up like:

      Connecting to database specified by database.yml
      ^[[1m^[[36m (0.1ms)^[[0m ^[[1mselect sqlite_version(*)^[[0m

      but the command "1G" works as expected. I have renamed .vimrc but the
      odd behaviour persists - what I am missing?

      Thanks,

      Phil.
      --
      Philip Rhoades

      GPO Box 3411
      Sydney NSW 2001
      Australia
      E-mail: phil@...

      --
      --
      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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • John Little
      ... The output of ... can aid understanding in these situations. normal behaviour of vim is to display escape sequences like your second case, not the
      Message 2 of 6 , Jun 23, 2013
      • 0 Attachment
        On Sunday, June 23, 2013 11:12:48 PM UTC+12, Philip Rhoades wrote:
        > what I am missing?

        The output of

        :scriptnames

        can aid understanding in these situations. "normal" behaviour of vim is to display escape sequences like your second case, not the first; in that first case there must be a script, or commands in a .vimrc, causing the sequences to be interpreted; the one I know about is AnsiEsc.vim, http://www.vim.org/scripts/script.php?script_id=302.

        Regards, John Little

        --
        --
        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

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Philip Rhoades
        John, ... The output of :scriptnames hereunder but I still don t understand - does it mean that one of those scripts is recognising the directory that the log
        Message 3 of 6 , Jun 24, 2013
        • 0 Attachment
          John,


          John Little <John.B.Little <at> gmail.com> writes:
          > On Sunday, June 23, 2013 11:12:48 PM UTC+12, Philip Rhoades wrote:
          >> People,
          >>
          >> Vim is displaying the same file differently and behaving differently
          >> when the file is in different directories:
          >>
          >> In:
          >>
          >> rails_dir/rails_app/log/development.log
          >>
          >> Vim processes the ESC sequences as normal to give coloured text but
          >> the command "1G" does not work - but if I copy the file with "cp -a ":
          >>
          >> rails_dir/development.log
          >>
          >> the ESC sequences show up like:
          >>
          >> Connecting to database specified by database.yml
          >> ^[[1m^[[36m (0.1ms)^[[0m ^[[1mselect sqlite_version(*)^[[0m
          >>
          >> but the command "1G" works as expected. I have renamed .vimrc but the
          >> odd behaviour persists - what I am missing?
          >>
          >> what I am missing?
          >
          >
          > The output of
          >
          > :scriptnames
          >
          > can aid understanding in these situations. "normal" behaviour of vim
          > is to display escape sequences like
          > your second case, not the first; in that first case there must be a
          > script, or commands in a .vimrc, causing
          > the sequences to be interpreted; the one I know about is AnsiEsc.vim,
          > http://www.vim.org/scripts/script.php?script_id=302.


          The output of :scriptnames hereunder but I still don't understand - does
          it mean that one of those scripts is recognising the directory that the
          log file is in and causing Vim to change it's display of the log file?

          Thanks,

          Phil.

          1: /etc/vimrc
          2: /usr/share/vim/vim73/syntax/syntax.vim
          3: /usr/share/vim/vim73/syntax/synload.vim
          4: /usr/share/vim/vim73/syntax/syncolor.vim
          5: /usr/share/vim/vim73/filetype.vim
          6: ~/.vim/ftdetect/ruby.vim
          7: /usr/share/vim/vim73/ftplugin.vim
          8: ~/.vim/plugin/AlignMapsPlugin.vim
          9: ~/.vim/plugin/AlignPlugin.vim
          10: ~/.vim/plugin/DirDiff.vim
          11: ~/.vim/plugin/NERD_tree.vim
          12: ~/.vim/plugin/Tabular.vim
          13: ~/.vim/plugin/cecutil.vim
          14: ~/.vim/plugin/filetype.vim
          15: ~/.vim/plugin/matchit.vim
          16: ~/.vim/macros/matchit.vim
          17: ~/.vim/plugin/netrwPlugin.vim
          18: ~/.vim/plugin/netrwclean.vim
          19: ~/.vim/plugin/rails.vim
          20: ~/.vim/plugin/voom.vim
          21: /usr/share/vim/vim73/plugin/getscriptPlugin.vim
          22: /usr/share/vim/vim73/plugin/gzip.vim
          23: /usr/share/vim/vim73/plugin/matchparen.vim
          24: /usr/share/vim/vim73/plugin/netrwPlugin.vim
          25: /usr/share/vim/vim73/plugin/rrhelper.vim
          26: /usr/share/vim/vim73/plugin/spellfile.vim
          27: /usr/share/vim/vim73/plugin/tarPlugin.vim
          28: /usr/share/vim/vim73/plugin/tohtml.vim
          29: /usr/share/vim/vim73/plugin/vimballPlugin.vim
          30: /usr/share/vim/vim73/plugin/zipPlugin.vim


          --
          Philip Rhoades

          GPO Box 3411
          Sydney NSW 2001
          Australia
          E-mail: phil@...

          --
          --
          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

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Ben Fritz
          ... No. :scriptnames shows you every script that Vim has loaded since startup. I notice your posted scriptnames output did NOT include a plugin like AnsiEsc.
          Message 4 of 6 , Jun 24, 2013
          • 0 Attachment
            On Monday, June 24, 2013 5:29:15 AM UTC-5, Philip Rhoades wrote:
            >
            > John Little <John.B.Little <at> gmail.com> writes:
            > > The output of
            > >
            > > :scriptnames
            > >
            > > can aid understanding in these situations. "normal" behaviour of vim
            > > is to display escape sequences like
            > > your second case, not the first; in that first case there must be a
            > > script, or commands in a .vimrc, causing
            > > the sequences to be interpreted; the one I know about is AnsiEsc.vim,
            > > http://www.vim.org/scripts/script.php?script_id=302.
            >
            >
            > The output of :scriptnames hereunder but I still don't understand - does
            > it mean that one of those scripts is recognising the directory that the
            > log file is in and causing Vim to change it's display of the log file?
            >

            No. :scriptnames shows you every script that Vim has loaded since startup.

            I notice your posted scriptnames output did NOT include a plugin like AnsiEsc. Would I be right to assume that your posted output applied to the case where escape sequences were shown as literal escape characters instead of being hidden?

            In this case scriptnames is most useful if you can compare the output of the working case to the non-working case to see what differs.

            As for the 1G command not working (to go to the top line), see the output of:

            :verbose map G

            --
            --
            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

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.


            .
          • Matteo Cavalleri
            ... rails.vim might be the culprit. the fact it alters the output of the file only when it s in an app proper log s directory is another hint in that
            Message 5 of 6 , Jun 24, 2013
            • 0 Attachment
              Il giorno lunedì 24 giugno 2013 12:29:15 UTC+2, Philip Rhoades ha scritto:

              > > your second case, not the first; in that first case there must be a
              >
              > > script, or commands in a .vimrc, causing
              >
              > > the sequences to be interpreted; the one I know about is AnsiEsc.vim,
              >
              > > http://www.vim.org/scripts/script.php?script_id=302.
              >
              >
              >
              >
              >
              > The output of :scriptnames hereunder but I still don't understand - does
              >
              > it mean that one of those scripts is recognising the directory that the
              >
              > log file is in and causing Vim to change it's display of the log file?
              >

              rails.vim might be the culprit. the fact it alters the output of the file only when it's in an app proper log's directory is another hint in that direction.

              --
              --
              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

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Philip Rhoades
              Matteo, ... Yep, that s it - thanks! Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: phil@pricom.com.au -- -- You received this message
              Message 6 of 6 , Jun 24, 2013
              • 0 Attachment
                Matteo,


                On 2013-06-24 23:28, Matteo Cavalleri wrote:
                > Il giorno lunedì 24 giugno 2013 12:29:15 UTC+2, Philip Rhoades ha
                > scritto:
                >
                >> > your second case, not the first; in that first case there must be a
                >>
                >> > script, or commands in a .vimrc, causing
                >>
                >> > the sequences to be interpreted; the one I know about is AnsiEsc.vim,
                >>
                >> > http://www.vim.org/scripts/script.php?script_id=302.
                >>
                >>
                >>
                >>
                >>
                >> The output of :scriptnames hereunder but I still don't understand -
                >> does
                >>
                >> it mean that one of those scripts is recognising the directory that
                >> the
                >>
                >> log file is in and causing Vim to change it's display of the log file?
                >>
                >
                > rails.vim might be the culprit. the fact it alters the output of the
                > file only when it's in an app proper log's directory is another hint
                > in that direction.


                Yep, that's it - thanks!

                Phil.
                --
                Philip Rhoades

                GPO Box 3411
                Sydney NSW 2001
                Australia
                E-mail: phil@...

                --
                --
                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

                ---
                You received this message because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              Your message has been successfully submitted and would be delivered to recipients shortly.