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

Re: Quickfix list with multi-line messages

Expand Messages
  • Marcin Szamotulski
    ... Hi Marcin, I think not. One remark that you should use instead of . echo abc ndef abc ndef echo abc ndef abc def Bud even if I use in your
    Message 1 of 5 , May 4, 2013
    • 0 Attachment
      On 21:59 Sat 04 May , Marcin Bednarek wrote:
      > Hello,
      >
      > Is it possible to add to quicklist message which will be show in multiple lines?
      > (I do not want to break line when it is too long)
      >
      > Example:
      >
      > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'entry'}], 'a')
      >
      > This will add new line with text: "entry". Could "entry" by displayed
      > in two lines?
      >
      > I tried below lines but I was not able to achieve desired result:
      >
      > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'ent\nry'}], 'a')
      > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'ent<CR>ry'}], 'a')
      >
      >
      > Thanks,
      >
      > Marcin
      >
      > --
      > --
      > 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.
      >
      >

      Hi Marcin,

      I think not. One remark that you should use "" instead of ''.
      echo 'abc\ndef'
      abc\ndef
      echo "abc\ndef"
      abc
      def

      Bud even if I use "" in your command the new line is change to a single
      space. See :help expr-" and :help expr-'.

      Best regadrds,
      Marcin :)

      --
      --
      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
      ... I don t think you can make a quickfix entry that spans multiple lines. When i have long quickfix messages, I normally just :setl nolist wrap linebreak on
      Message 2 of 5 , May 5, 2013
      • 0 Attachment
        On Saturday, May 4, 2013 3:59:06 PM UTC-5, Paws wrote:
        > Hello,
        >
        > Is it possible to add to quicklist message which will be show in multiple lines?
        > (I do not want to break line when it is too long)
        >
        > Example:
        >
        > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'entry'}], 'a')
        >
        >
        >
        > This will add new line with text: "entry". Could "entry" by displayed in two lines?
        >
        > I tried below lines but I was not able to achieve desired result:
        >
        > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'ent\nry'}], 'a')
        >
        >
        > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'ent<CR>ry'}], 'a')
        >
        >
        > Thanks,
        >
        > Marcin

        I don't think you can make a quickfix entry that spans multiple lines. When i have long quickfix messages, I normally just ":setl nolist wrap linebreak" on the quickfix window.

        I also have "showbreak" set to something in my .vimrc.

        --
        --
        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.
      • Paws
        Hello guys, Thanks for responses. It looks like what I am trying to achieve is currently not possible. Yes, I read I can wrap lines, this is why I added my
        Message 3 of 5 , May 5, 2013
        • 0 Attachment
          Hello guys,

          Thanks for responses. It looks like what I am trying to achieve is
          currently not possible. Yes, I read I can wrap lines, this is why I
          added my comment in brackets in previous email. Just to let you know
          why I asked this question. Javac compiler returns output in multi-line
          format and I would like to show it in quickfix window. Formatting is
          important because for example ^ sign is used to show exactly where the
          error is (for instance indicates place where class is missing, I know
          I can use signs or balloons). It looks like I need to take other
          approach and look for solution to show nicely formatted compiler
          output in one line.

          Thanks,

          Marcin

          On 5 Maj, 14:14, Ben Fritz <fritzophre...@...> wrote:
          > On Saturday, May 4, 2013 3:59:06 PM UTC-5, Paws wrote:
          > > Hello,
          >
          > > Is it possible to add to quicklist message which will be show in multiple lines?
          > > (I do not want to break line when it is too long)
          >
          > > Example:
          >
          > > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'entry'}], 'a')
          >
          > > This will add new line with text: "entry". Could "entry" by displayed in two lines?
          >
          > > I tried below lines but I was not able to achieve desired result:
          >
          > > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'ent\nry'}], 'a')
          >
          > > :call setqflist([{'bufnr': bufnr(''), 'lnum': 42, 'text': 'ent<CR>ry'}], 'a')
          >
          > > Thanks,
          >
          > > Marcin
          >
          > I don't think you can make a quickfix entry that spans multiple lines. When i have long quickfix messages, I normally just ":setl nolist wrap linebreak" on the quickfix window.
          >
          > I also have "showbreak" set to something in my .vimrc.

          --
          --
          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
          ... Vim may not DISPLAY quickfix entries on multiple lines, but Vim CAN parse multi-line compiler output. Vim then translates these multi-line outputs into a
          Message 4 of 5 , May 5, 2013
          • 0 Attachment
            On Sunday, May 5, 2013 8:48:36 AM UTC-5, Paws wrote:
            >
            >
            > Javac compiler returns output in multi-line
            >
            > format and I would like to show it in quickfix window.

            Vim may not DISPLAY quickfix entries on multiple lines, but Vim CAN parse multi-line compiler output. Vim then translates these multi-line outputs into a single-line entry. See :help errorformat-multi-line

            > Formatting is
            >
            > important because for example ^ sign is used to show exactly where the
            >
            > error is

            For this you need the %p item in :help errorformat

            > (for instance indicates place where class is missing, I know
            >
            > I can use signs or balloons). It looks like I need to take other
            >
            > approach and look for solution to show nicely formatted compiler
            >
            > output in one line.
            >
            >

            I'd also expect that something as common as javac would already have a compiler plugin. Have you tried setting the compiler to javac (with :compiler javac)? See :help :compiler. The default Vim distribution seems to include a javac plugin but I don't know anything about it beyond what's in the help. The help seems to indicate that the ------^ lines are parsed.

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