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

Tag references and tabs in help files

Expand Messages
  • Andre Majorel
    In help.txt, tabs are used as if help.vim didn t strip the | around tag references. Is it how it s supposed to be ? Thanks in advance. -- André Majorel
    Message 1 of 7 , Nov 4, 2012
    • 0 Attachment
      In help.txt, tabs are used as if help.vim didn't strip the "|"
      around tag references. Is it how it's supposed to be ?

      Thanks in advance.

      --
      André Majorel http://www.teaser.fr/~amajorel/
      Subliminal message : Vim needs elastic tab stops.

      --
      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
    • Marcin Szamotulski
      ... See my other answer to your post. help.vim is not stripping | , (and also * ). This is done by the conceal vim feature. If you have it (:echo
      Message 2 of 7 , Nov 4, 2012
      • 0 Attachment
        On 11:53 Sun 04 Nov , Andre Majorel wrote:
        > In help.txt, tabs are used as if help.vim didn't strip the "|"
        > around tag references. Is it how it's supposed to be ?
        >
        > Thanks in advance.
        >
        > --
        > André Majorel http://www.teaser.fr/~amajorel/
        > Subliminal message : Vim needs elastic tab stops.
        >
        > --
        > 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

        See my other answer to your post. help.vim is not stripping "|", (and
        also "*"). This is done by the conceal vim feature. If you have it
        (:echo has("conceal")) then you can check where the 'cole' option was
        set from: open a help file and run:
        :verb set cole?

        Normally it is set in help.vim. So I guess you have overwritten it
        somehow, or your vim/gvim has not conceal feature. See ":help 'cole'",
        ":help 'cocu'", ":help conceal".

        Best,
        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
      • Tony Mechelynck
        ... What the OP means, and I confirm it, is that when conceallevel is 2 (as $VIMRUNTIME/ftplugin/help.vim sets it) the columns and indents in help files
        Message 3 of 7 , Nov 4, 2012
        • 0 Attachment
          On 04/11/12 13:48, Marcin Szamotulski wrote:
          > On 11:53 Sun 04 Nov , Andre Majorel wrote:
          >> In help.txt, tabs are used as if help.vim didn't strip the "|"
          >> around tag references. Is it how it's supposed to be ?
          >>
          >> Thanks in advance.
          >>
          >> --
          >> André Majorel http://www.teaser.fr/~amajorel/
          >> Subliminal message : Vim needs elastic tab stops.
          >>
          >> --
          >> 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
          >
          > See my other answer to your post. help.vim is not stripping "|", (and
          > also "*"). This is done by the conceal vim feature. If you have it
          > (:echo has("conceal")) then you can check where the 'cole' option was
          > set from: open a help file and run:
          > :verb set cole?
          >
          > Normally it is set in help.vim. So I guess you have overwritten it
          > somehow, or your vim/gvim has not conceal feature. See ":help 'cole'",
          > ":help 'cocu'", ":help conceal".
          >
          > Best,
          > Marcin
          >

          What the OP means, and I confirm it, is that when 'conceallevel' is 2
          (as $VIMRUNTIME/ftplugin/help.vim sets it) the columns and indents in
          help files become misaligned. OTOH, setting 'conceallevel' to zero
          (either by an after-syntax plugin, or by running a feature-poor Vim
          compiled with -conceal, or even manually), the columns and indents align
          properly.

          I suppose that this is "how it is supposed to be", for several reasons:
          - The 'conceal' feature is relatively recent in mainline Vim (though it
          existed before as an unofficial patch). The help files are much more
          ancient, and of course when vanilla Vim did not have +conceal the help
          files took no account of the feature
          - There are still Vim versions (from Tiny to Normal) which are compiled
          without the feature. +conceal is present only in Big and Huge builds.
          - There are still diehard conservatives like me, who set 'conceallevel'
          to zero in help files
          - Vim's indent plugins mostly take no account of +conceal; they treat
          concealed text as visible text.


          Best regards,
          Tony.
          --
          The war between Emacs and Vi is over. Vi has won with 3 to 1.
          http://www.ssc.com/lg/issue30/raymond.html

          --
          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
        • stosss
          On Sun, Nov 4, 2012 at 11:25 AM, Tony Mechelynck ... Okay I read :h conceal what exactly is the benefit of this setting? Why would one use it? -- You received
          Message 4 of 7 , Nov 4, 2012
          • 0 Attachment
            On Sun, Nov 4, 2012 at 11:25 AM, Tony Mechelynck
            <antoine.mechelynck@...> wrote:
            > On 04/11/12 13:48, Marcin Szamotulski wrote:
            >>
            >> On 11:53 Sun 04 Nov , Andre Majorel wrote:
            >>>
            >>> In help.txt, tabs are used as if help.vim didn't strip the "|"
            >>> around tag references. Is it how it's supposed to be ?
            >>>
            >>
            >>
            >> See my other answer to your post. help.vim is not stripping "|", (and
            >> also "*"). This is done by the conceal vim feature. If you have it
            >> (:echo has("conceal")) then you can check where the 'cole' option was
            >> set from: open a help file and run:
            >> :verb set cole?
            >>
            >> Normally it is set in help.vim. So I guess you have overwritten it
            >> somehow, or your vim/gvim has not conceal feature. See ":help 'cole'",
            >> ":help 'cocu'", ":help conceal".
            >>
            >
            > What the OP means, and I confirm it, is that when 'conceallevel' is 2 (as
            > $VIMRUNTIME/ftplugin/help.vim sets it) the columns and indents in help files
            > become misaligned. OTOH, setting 'conceallevel' to zero (either by an
            > after-syntax plugin, or by running a feature-poor Vim compiled with
            > -conceal, or even manually), the columns and indents align properly.
            >
            > I suppose that this is "how it is supposed to be", for several reasons:
            > - The 'conceal' feature is relatively recent in mainline Vim (though it
            > existed before as an unofficial patch). The help files are much more
            > ancient, and of course when vanilla Vim did not have +conceal the help files
            > took no account of the feature
            > - There are still Vim versions (from Tiny to Normal) which are compiled
            > without the feature. +conceal is present only in Big and Huge builds.
            > - There are still diehard conservatives like me, who set 'conceallevel' to
            > zero in help files
            > - Vim's indent plugins mostly take no account of +conceal; they treat
            > concealed text as visible text.
            >
            >

            Okay I read :h conceal what exactly is the benefit of this setting?
            Why would one use it?

            --
            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
          • Dominique Pellé
            ... There is a patch, still pending, to fix the misalignment happening with tabs and conceal feature See:
            Message 5 of 7 , Nov 4, 2012
            • 0 Attachment
              Tony Mechelynck wrote:

              > What the OP means, and I confirm it, is that when 'conceallevel' is 2 (as
              > $VIMRUNTIME/ftplugin/help.vim sets it) the columns and indents in help files
              > become misaligned. OTOH, setting 'conceallevel' to zero (either by an
              > after-syntax plugin, or by running a feature-poor Vim compiled with
              > -conceal, or even manually), the columns and indents align properly.


              There is a patch, still pending, to fix the misalignment happening with
              tabs and conceal feature See:

              http://www.mail-archive.com/vim_dev@.../msg18586.html

              -- Dominique

              --
              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
            • Tony Mechelynck
              On 04/11/12 17:49, stosss wrote: [...] ... Simple: To make text invisible, not just with a background and foreground of the same colour, but actually occupying
              Message 6 of 7 , Nov 4, 2012
              • 0 Attachment
                On 04/11/12 17:49, stosss wrote:
                [...]
                >
                > Okay I read :h conceal what exactly is the benefit of this setting?
                > Why would one use it?
                >
                Simple: To make text invisible, not just with a background and
                foreground of the same colour, but actually occupying no space on the
                screen.

                Whether that is desirable, and in which cases, is a question of user
                preference. Vim is about choice, and in fact Vim old-timers are proud of
                the fact that with Vim, there are often several ways (sometimes _many_
                ways) to achieve a desired result.

                An example of usefulness of the feature would be to display a file
                containing ANSI escape sequences: for instance, with a properly
                constructed syntax script, the sequence ^[[1;35;42m (where the initial
                ^[ is an actual Escape) would set bright green on magenta, but the
                sequence itself would be concealed by Vim just as it would be by an ANSI
                terminal.


                Best regards,
                Tony.
                --
                British Israelites:
                The British Israelites believe the white Anglo-Saxons of
                Britain to be descended from the ten lost tribes of Israel deported by
                Sargon of Assyria on the fall of Sumeria in 721 B.C. ... They further
                believe that the future can be foretold by the measurements of the
                Great Pyramid, which probably means it will be big and yellow and in
                the hand of the Arabs. They also believe that if you sleep with your
                head under the pillow a fairy will come and take all your teeth.
                -- Mike Harding, "The Armchair Anarchist's Almanac"

                --
                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
              • Dominique Pellé
                ... Charles Campbell has a nice plugin doing exactly that: http://www.vim.org/scripts/script.php?script_id=302 -- Dominique -- You received this message from
                Message 7 of 7 , Nov 4, 2012
                • 0 Attachment
                  Tony Mechelynck <antoine.mechelynck@...> wrote:

                  > On 04/11/12 17:49, stosss wrote:
                  > [...]
                  >
                  >>
                  >> Okay I read :h conceal what exactly is the benefit of this setting?
                  >> Why would one use it?
                  >>
                  ...
                  > An example of usefulness of the feature would be to display a file
                  > containing ANSI escape sequences: for instance, with a properly constructed
                  > syntax script, the sequence ^[[1;35;42m (where the initial ^[ is an actual
                  > Escape) would set bright green on magenta, but the sequence itself would be
                  > concealed by Vim just as it would be by an ANSI terminal.

                  Charles Campbell has a nice plugin doing exactly that:

                  http://www.vim.org/scripts/script.php?script_id=302

                  -- Dominique

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