Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. tabs to 4 spaces

tabs to 4 spaces

Scheduled Pinned Locked Moved The Lounge
c++question
26 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Kevnar

    You can do that in PERL in one line... $sourcecode =~ s/\t/ {4}/g; Assuming you have access to perl. Assuming you meant outside of your native code editor. (I can't vouch for the absolute accuracy of the above line. I haven't used PERL in a while.) Why not throw away a dime? I throw away ten pennies all the time.

    N Offline
    N Offline
    Nish Nishant
    wrote on last edited by
    #21

    I do have perl access. But I wanted it as a sort of editor feature. Nish


    Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

    1 Reply Last reply
    0
    • C Chris Maunder

      Because when displayed in HTML tabs within a <pre> block are quite wide (around 8 spaces) whereas 4 spaces inside a <pre> block is 4 spaces. I'm guessing Nish is editing his articles. cheers, Chris Maunder

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #22

      Chris Maunder wrote: I'm guessing Nish is editing his articles. :-O :-O :-O


      Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

      1 Reply Last reply
      0
      • J Jorgen Sigvardsson

        Hmm. I just don't get it, why are spaces better than tabs? Sonorked as well: 100.13197 jorgen FreeBSD is sexy.

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #23

        Jörgen Sigvardsson wrote: Hmm. I just don't get it, why are spaces better than tabs? They are not better or worse. But for CP articles, tabs cause horizontal scrolling!!! Nish


        Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

        J 1 Reply Last reply
        0
        • M Michael Dunn

          Nish - Native CPian wrote: I want to replace the tabs with 4 spaces each. That's what "untabify" does. ;) --Mike-- Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines! My really out-of-date homepage Sonork - 100.10414 AcidHelm

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #24

          Michael Dunn wrote: That's what "untabify" does. Oh! Thanks, then :-) Nish


          Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

          1 Reply Last reply
          0
          • N Nish Nishant

            Jörgen Sigvardsson wrote: Hmm. I just don't get it, why are spaces better than tabs? They are not better or worse. But for CP articles, tabs cause horizontal scrolling!!! Nish


            Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #25

            Nish - Native CPian wrote: They are not better or worse 1) Tabs are better. I could start a huge rant about that. Nish - Native CPian wrote: But for CP articles, tabs cause horizontal scrolling!!! 2) This is the exception to 1). :-D Sonorked as well: 100.13197 jorgen FreeBSD is sexy.

            N 1 Reply Last reply
            0
            • J Jorgen Sigvardsson

              Nish - Native CPian wrote: They are not better or worse 1) Tabs are better. I could start a huge rant about that. Nish - Native CPian wrote: But for CP articles, tabs cause horizontal scrolling!!! 2) This is the exception to 1). :-D Sonorked as well: 100.13197 jorgen FreeBSD is sexy.

              N Offline
              N Offline
              Nish Nishant
              wrote on last edited by
              #26

              Jörgen Sigvardsson wrote: 2) This is the exception to 1). Maybe :-) But that exception has been responsible for making a lot of my articles scroll horizontally :-) Nish


              Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups