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

Re: Nice display of leading tabs

Expand Messages
  • Adam
    ... You can change how tabs are displayed using the listchars field ( http://vim.wikia.com/wiki/Highlight_unwanted_spaces#Using_the_list_and_listchars_options
    Message 1 of 10 , Nov 1, 2010
    View Source
    • 0 Attachment
      On Mon, Nov 1, 2010 at 11:26, statquant2 <statquant@...> wrote:

      Hi all,
      browsing for a nice theme I found this http://leetless.de/vim.html, I am
      intersted to understand how you can have this nice display of indentation
      you can see on any theme of the page.
      I browsed the guy .vimrc file but I can't make it work.

      Do somebody have some insight ?

      You can change how tabs are displayed using the listchars field (http://vim.wikia.com/wiki/Highlight_unwanted_spaces#Using_the_list_and_listchars_options)
       
      So I believe this is how his specific layout is done (don't have vim atm so I can't test - might have to escape the pipe)
       
      :set listchars=tab:|-

      --
      ~Adam~

      --
      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
    • AK
      ... You need to do something like this: set list listchars=tab:»·,trail:·,extends:$,nbsp:= trail is for trailing spaces, extends I don t remember what for,
      Message 2 of 10 , Nov 1, 2010
      View Source
      • 0 Attachment
        On 11/01/2010 12:26 PM, statquant2 wrote:
        >
        > Hi all,
        > browsing for a nice theme I found this http://leetless.de/vim.html, I am
        > intersted to understand how you can have this nice display of indentation
        > you can see on any theme of the page.
        > I browsed the guy .vimrc file but I can't make it work.
        >
        > Do somebody have some insight ?
        >
        > Cheers

        You need to do something like this:

        set list listchars=tab:»·,trail:·,extends:$,nbsp:=

        trail is for trailing spaces, extends I don't remember what for, nbsp is
        a non-breaking space char. Experiment with tab chars... -ak

        --
        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
      • statquant2
        Yes thanks almost there!!!! set list listchars=tab: |-,trail:-,extends:$,nbsp:= is doing fine but it is missing to fill the lines without code Here is what I
        Message 3 of 10 , Nov 1, 2010
        View Source
        • 0 Attachment
          Yes thanks almost there!!!!
          set list listchars=tab:\|-,trail:-,extends:$,nbsp:=
          is doing fine but it is missing to fill the lines without code

          Here is what I get
          |----int test;
          |----int test2;
          //here there should be some |----
          |----int test3;

          --
          View this message in context: http://vim.1045645.n5.nabble.com/Nice-display-of-leading-tabs-tp3245279p3245333.html
          Sent from the Vim - General mailing list archive at Nabble.com.

          --
          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
        • Brian L. Matthews
          ... It s the tab setting in his lcs (aka listchars) setting. I use: set listchars=eol:$,tab: ─,extends: ,precedes:
          Message 4 of 10 , Nov 1, 2010
          View Source
          • 0 Attachment
            On 11/1/10 9:26 AM, statquant2 wrote:
            > browsing for a nice theme I found this http://leetless.de/vim.html, I am
            > intersted to understand how you can have this nice display of indentation
            > you can see on any theme of the page.
            > I browsed the guy .vimrc file but I can't make it work.

            It's the tab setting in his lcs (aka listchars) setting. I use:

            set listchars=eol:$,tab:>─,extends:>,precedes:<,nbsp:~$

            I've also used:

            set listchars=eol:$,tab:|_,extends:>,precedes:<,nbsp:~$

            Brian

            --
            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
          • Brian L. Matthews
            ... Ok, this is what I get for doing things from memory and not testing. :-( You have to escape the |: set listchars=eol:$,tab: |_,extends: ,precedes:
            Message 5 of 10 , Nov 1, 2010
            View Source
            • 0 Attachment
              On 11/1/10 9:55 AM, Brian L. Matthews wrote:
              > On 11/1/10 9:26 AM, statquant2 wrote:
              >> browsing for a nice theme I found this http://leetless.de/vim.html, I am
              >> intersted to understand how you can have this nice display of
              >> indentation
              >> you can see on any theme of the page.
              >> I browsed the guy .vimrc file but I can't make it work.
              >
              > It's the tab setting in his lcs (aka listchars) setting. I use:
              >
              > set listchars=eol:$,tab:>─,extends:>,precedes:<,nbsp:~$
              >
              > I've also used:
              >
              > set listchars=eol:$,tab:|_,extends:>,precedes:<,nbsp:~$

              Ok, this is what I get for doing things from memory and not testing. :-(
              You have to escape the |:

              set listchars=eol:$,tab:\|_,extends:>,precedes:<,nbsp:~$

              Brian

              --
              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
            • AK
              ... I don t think you can do that. He probably has some actual tabs in the empty lines. -ak -- You received this message from the vim_use maillist. Do not
              Message 6 of 10 , Nov 1, 2010
              View Source
              • 0 Attachment
                On 11/01/2010 12:54 PM, statquant2 wrote:
                >
                > Yes thanks almost there!!!!
                > set list listchars=tab:\|-,trail:-,extends:$,nbsp:=
                > is doing fine but it is missing to fill the lines without code
                >
                > Here is what I get
                > |----int test;
                > |----int test2;
                > //here there should be some |----
                > |----int test3;
                >

                I don't think you can do that. He probably has some actual tabs in the
                "empty" lines. -ak

                --
                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
              • statquant2
                not working Brian :( -- View this message in context: http://vim.1045645.n5.nabble.com/Nice-display-of-leading-tabs-tp3245279p3245364.html Sent from the Vim -
                Message 7 of 10 , Nov 1, 2010
                View Source
                • 0 Attachment
                  not working Brian :(
                  --
                  View this message in context: http://vim.1045645.n5.nabble.com/Nice-display-of-leading-tabs-tp3245279p3245364.html
                  Sent from the Vim - General mailing list archive at Nabble.com.

                  --
                  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
                • Андрей Хитров
                  For tabs and trailing spaces I use those display settings along with the theme desert . To my taste it looks pretty cool, at least for development in Python.
                  Message 8 of 10 , Nov 1, 2010
                  View Source
                  • 0 Attachment
                    For tabs and trailing spaces I use those display settings
                    along with the theme "desert". To my taste it looks pretty cool,
                    at least for development in Python.

                    " displaying tab characters and trailing spaces
                    " with special characters \u2592\u2591 and \u2593
                    set lcs=tab:▒░,trail:▓
                    set list

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