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

Re: replace represenation of certain characters with a string of characters?

Expand Messages
  • neolus
    I m sorry to be misleading, from the start I wanted to be able to do this with more than 2 characters ( at least 4 in particular) it seems like I gave the
    Message 1 of 18 , Mar 26, 2013
    • 0 Attachment
      I'm sorry to be misleading, from the start I wanted to be able to do this
      with more than 2 characters ( at least 4 in particular) it seems like I gave
      the impression that I only needed two.



      --
      View this message in context: http://vim.1045645.n5.nabble.com/replace-represenation-of-certain-characters-with-a-string-of-characters-tp5714620p5714653.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

      ---
      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
      ... Another thought, you could use autocommands on reading and writing the file to change what s seen, like the way vim handles gzipped files. Regards, John
      Message 2 of 18 , Mar 26, 2013
      • 0 Attachment
        > I wanted to be able to do thiswith more than 2 characters ( at least 4 in particular)

        Another thought, you could use autocommands on reading and writing the file to change what's seen, like the way vim handles gzipped files.

        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.
      • Christian Brabandt
        ... If you read my message again, I already wrote, that only a single character is possible. regards, Christian -- -- You received this message from the
        Message 3 of 18 , Mar 26, 2013
        • 0 Attachment
          On Wed, March 27, 2013 02:45, neolus wrote:
          > whenever I tried with two characters vim complained it was an invalid
          > argument.
          > conceallevel 2 is on but it still won't work with more than one character.
          > I tried
          > hi Special gui=bold guibg=#000000 guifg=#022FEE
          > set cole=2
          > syn match Container "B" conceal cchar=AE
          > syn match Container "B" conceal cchar=Ąę
          > and it complained. Were you just suggesting I try it? or did you try it
          > and
          > it worked?
          > I read the help file and it does technically say that 2 still takes one
          > character.
          > "is completely hidden unless it has a
          > custom replacement character"


          If you read my message again, I already wrote, that only a single character
          is possible.

          regards,
          Christian


          --
          --
          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.
        • Christian Brabandt
          ... How about a different approach and misusing folding: set fdm=expr fde= 1 fdl=0 foldminlines=0 fdt=substitute(getline(v:foldstart), vim , EMACS , g )
          Message 4 of 18 , Mar 26, 2013
          • 0 Attachment
            On Wed, March 27, 2013 04:46, neolus wrote:
            > I'm sorry to be misleading, from the start I wanted to be able to do this
            > with more than 2 characters ( at least 4 in particular) it seems like I
            > gave
            > the impression that I only needed two.
            >

            How about a different approach and misusing folding:
            set fdm=expr fde='>1' fdl=0 foldminlines=0
            fdt=substitute(getline(v:foldstart),'vim','EMACS','g') fillchars-=fold

            (You might want to adjust the Folded highlighting group. Syntax
            highlighting won't be possible though).

            regards,
            Christian

            --
            --
            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.
          • neolus
            hi I tried the first command and then the second gave me an error saying E492: Not an editor command: fdt=substitute(getline(v:foldstart), vim , EMACS , g )
            Message 5 of 18 , Mar 27, 2013
            • 0 Attachment
              hi I tried the first command and then the second gave me an error saying

              E492: Not an editor command:
              fdt=substitute(getline(v:foldstart),'vim','EMACS','g') fillchars-=fold
              I also tried the command with
              set fdt=substitute(getline(v:foldstart),'vim','EMACS','g')
              fillchars-=fold
              which didn't complain but nothing happened, ( I typed a g and it was the
              same? )

              Anyway I'd like to keep syntax highlighting if possible so maybe we
              shouldn't get too much in to this. I have a feeling it won't lead to
              promising results...





              --
              View this message in context: http://vim.1045645.n5.nabble.com/replace-represenation-of-certain-characters-with-a-string-of-characters-tp5714620p5714664.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

              ---
              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.
            • neolus
              John Little-4 wrote ... you mean like running sed on the whole file when opening it and running it again after saving it? that s basically my give up plan --
              Message 6 of 18 , Mar 27, 2013
              • 0 Attachment
                John Little-4 wrote
                > Another thought, you could use autocommands on reading and writing the
                > file to change what's seen, like the way vim handles gzipped files.

                you mean like running sed on the whole file when opening it and running it
                again after saving it?
                that's basically my "give up plan"



                --
                View this message in context: http://vim.1045645.n5.nabble.com/replace-represenation-of-certain-characters-with-a-string-of-characters-tp5714620p5714667.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

                ---
                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.
              • Christian Brabandt
                ... That was supposed to be typed in one single line (e.g. one single :set line without linebreaks), probably my mail was wrapped when sending. You also need
                Message 7 of 18 , Mar 27, 2013
                • 0 Attachment
                  On Wed, March 27, 2013 16:51, neolus wrote:
                  > hi I tried the first command and then the second gave me an error saying
                  >
                  > E492: Not an editor command:
                  > fdt=substitute(getline(v:foldstart),'vim','EMACS','g') fillchars-=fold
                  > I also tried the command with
                  > set fdt=substitute(getline(v:foldstart),'vim','EMACS','g')
                  > fillchars-=fold
                  > which didn't complain but nothing happened, ( I typed a g and it was the
                  > same? )

                  That was supposed to be typed in one single line (e.g. one single :set
                  line without linebreaks), probably my mail was wrapped when sending.
                  You also need to enable folding, e.g. :set foldenable

                  So in whole type this as 1 single :set statement:
                  set fdm=expr fde='>1' fdl=0 foldminlines=0
                  fdt=substitute(getline(v:foldstart),'vim','EMACS','g') fillchars-=fold fen

                  BTW: You know, that you need to replace vim by the chars you want to be
                  replaced and EMACS by the chars, that you like to see, right?

                  regards,
                  Christian

                  --
                  --
                  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.
                • neolus
                  Christian Brabandt wrote ... no I did not get that before :) thx for explaining. impressive workaround! now just to make it more seemless I only need to figure
                  Message 8 of 18 , Apr 3, 2013
                  • 0 Attachment
                    Christian Brabandt wrote
                    > BTW: You know, that you need to replace vim by the chars you want to be
                    > replaced and EMACS by the chars, that you like to see, right?

                    no I did not get that before :) thx for explaining.
                    impressive workaround!
                    now just to make it more seemless
                    I only need to figure out a way to get rid of the highlighting and appended
                    '--------'s
                    to get what I want now.




                    --
                    View this message in context: http://vim.1045645.n5.nabble.com/replace-represenation-of-certain-characters-with-a-string-of-characters-tp5714620p5714782.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

                    ---
                    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.
                  • Christian Brabandt
                    Hi neolus! ... What highlighting? ... The :set fillchars-=fold should have taken care of that. In any case, make sure your fillchars setting doesn t include
                    Message 9 of 18 , Apr 3, 2013
                    • 0 Attachment
                      Hi neolus!

                      On Mi, 03 Apr 2013, neolus wrote:

                      > Christian Brabandt wrote
                      > > BTW: You know, that you need to replace vim by the chars you want to be
                      > > replaced and EMACS by the chars, that you like to see, right?
                      >
                      > no I did not get that before :) thx for explaining.
                      > impressive workaround!
                      > now just to make it more seemless
                      > I only need to figure out a way to get rid of the highlighting and appended

                      What highlighting?

                      > '--------'s to get what I want now.

                      The :set fillchars-=fold should have taken care of that. In any case,
                      make sure your 'fillchars' setting doesn't include the fold item.

                      Mit freundlichen Grüßen
                      Christian
                      --
                      Glauben: Dinge für wahr halten, für die es keine Parallele und keinen
                      Beweis gibt und die jemand verkündet, der über kein Wissen verfügt.
                      -- Ambrose Gwinnet Bierce (Des Teufels Wörterbuch)

                      --
                      --
                      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.
                    • neolus
                      It s probably just my color scheme I have to fix, thx for all the help Christian! TSCHÜSS! -- View this message in context:
                      Message 10 of 18 , Apr 4, 2013
                      • 0 Attachment
                        It's probably just my color scheme I have to fix, thx for all the help
                        Christian!
                        TSCHÜSS!



                        --
                        View this message in context: http://vim.1045645.n5.nabble.com/replace-represenation-of-certain-characters-with-a-string-of-characters-tp5714620p5714819.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

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