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.
  • N Nish Nishant

    Is there any tool to replace a tab with 4 spaces? It's a big pain to do that, manually!!! Nish


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

    M Offline
    M Offline
    Michael Dunn
    wrote on last edited by
    #2

    VC can do it. Edit->Advanced->Untabify Selection --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 1 Reply Last reply
    0
    • N Nish Nishant

      Is there any tool to replace a tab with 4 spaces? It's a big pain to do that, manually!!! Nish


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

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #3

      Select Tab. Hit Ctrl+C. Hit Ctrl+H. Past tab into top box. Enter 4 spaces in bottom box. Hit 'Replace' cheers, Chris Maunder

      L N B 3 Replies Last reply
      0
      • C Chris Maunder

        Select Tab. Hit Ctrl+C. Hit Ctrl+H. Past tab into top box. Enter 4 spaces in bottom box. Hit 'Replace' cheers, Chris Maunder

        L Offline
        L Offline
        Luis Alonso Ramos
        wrote on last edited by
        #4

        Chris Maunder wrote: Select Tab. Hit Ctrl+C. Hit Ctrl+H. Past tab into top box. Enter 4 spaces in bottom box. Hit 'Replace' That will not always work... What if there is a space and then a tab character? it will replace the 3-spaces tab with 4 spaces. -- LuisR ──────────────   Luis Alonso Ramos   Chihuahua, Mexico   www.luisalonsoramos.com "Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein

        N 1 Reply Last reply
        0
        • M Michael Dunn

          VC can do it. Edit->Advanced->Untabify Selection --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
          #5

          Michael Dunn wrote: VC can do it. Edit->Advanced->Untabify Selection But I don't wanna untabify them. I want to replace the tabs with 4 spaces each. Nish


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

          M 1 Reply Last reply
          0
          • L Luis Alonso Ramos

            Chris Maunder wrote: Select Tab. Hit Ctrl+C. Hit Ctrl+H. Past tab into top box. Enter 4 spaces in bottom box. Hit 'Replace' That will not always work... What if there is a space and then a tab character? it will replace the 3-spaces tab with 4 spaces. -- LuisR ──────────────   Luis Alonso Ramos   Chihuahua, Mexico   www.luisalonsoramos.com "Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein

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

            Luis Alonso Ramos wrote: That will not always work... What if there is a space and then a tab character? it will replace the 3-spaces tab with 4 spaces. Uh oh! I hope there won't be too many such occurences. 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

              Select Tab. Hit Ctrl+C. Hit Ctrl+H. Past tab into top box. Enter 4 spaces in bottom box. Hit 'Replace' cheers, Chris Maunder

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

              Chris Maunder wrote: Select Tab. Hit Ctrl+C. Hit Ctrl+H. Past tab into top box. Enter 4 spaces in bottom box. Hit 'Replace' Thanks Chris. I wonder why I didn't think of that :-) Nish


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

              1 Reply Last reply
              0
              • K Kannan Kalyanaraman

                did u try editplus Kannan

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

                Kannan Kalyanaraman wrote: did u try editplus Nope! If it's not freeware, don't even give me the link Nish p.s. to play swf files locally you need to download flashpla.exe [search on google]


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

                K H 2 Replies Last reply
                0
                • N Nish Nishant

                  Is there any tool to replace a tab with 4 spaces? It's a big pain to do that, manually!!! Nish


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

                  K Offline
                  K Offline
                  Kannan Kalyanaraman
                  wrote on last edited by
                  #9

                  did u try editplus Kannan

                  N 1 Reply Last reply
                  0
                  • N Nish Nishant

                    Kannan Kalyanaraman wrote: did u try editplus Nope! If it's not freeware, don't even give me the link Nish p.s. to play swf files locally you need to download flashpla.exe [search on google]


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

                    K Offline
                    K Offline
                    Kannan Kalyanaraman
                    wrote on last edited by
                    #10

                    Nish - Native CPian wrote: Nope! If it's not freeware, don't even give me the link Oh ! I didn't know that you are looking for freeware :-) Anyway, you can withstand the pain for installing/removing you can try downloading the eval. thanks i got the flashplayer. Kannan

                    N 1 Reply Last reply
                    0
                    • N Nish Nishant

                      Kannan Kalyanaraman wrote: did u try editplus Nope! If it's not freeware, don't even give me the link Nish p.s. to play swf files locally you need to download flashpla.exe [search on google]


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

                      H Offline
                      H Offline
                      Haim Yulzari
                      wrote on last edited by
                      #11

                      Nish - Native CPian wrote: Nope! If it's not freeware, don't even give me the link Try this excellent freeware: www.vim.org Haim

                      N 1 Reply Last reply
                      0
                      • N Nish Nishant

                        Is there any tool to replace a tab with 4 spaces? It's a big pain to do that, manually!!! Nish


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

                        L Offline
                        L Offline
                        loket
                        wrote on last edited by
                        #12

                        ...hmmm, and i who tought you where a programmer. ;P

                        N 1 Reply Last reply
                        0
                        • C Chris Maunder

                          Select Tab. Hit Ctrl+C. Hit Ctrl+H. Past tab into top box. Enter 4 spaces in bottom box. Hit 'Replace' cheers, Chris Maunder

                          B Offline
                          B Offline
                          Brian Delahunty
                          wrote on last edited by
                          #13

                          Thanks ;-)


                          "When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]

                          1 Reply Last reply
                          0
                          • N Nish Nishant

                            Is there any tool to replace a tab with 4 spaces? It's a big pain to do that, manually!!! Nish


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

                            K Offline
                            K Offline
                            Kevnar
                            wrote on last edited by
                            #14

                            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 1 Reply Last reply
                            0
                            • N Nish Nishant

                              Is there any tool to replace a tab with 4 spaces? It's a big pain to do that, manually!!! 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
                              #15

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

                              C N 2 Replies 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.

                                C Offline
                                C Offline
                                Chris Maunder
                                wrote on last edited by
                                #16

                                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 1 Reply Last reply
                                0
                                • N Nish Nishant

                                  Michael Dunn wrote: VC can do it. Edit->Advanced->Untabify Selection But I don't wanna untabify them. I want to replace the tabs with 4 spaces each. Nish


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

                                  M Offline
                                  M Offline
                                  Michael Dunn
                                  wrote on last edited by
                                  #17

                                  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 1 Reply Last reply
                                  0
                                  • H Haim Yulzari

                                    Nish - Native CPian wrote: Nope! If it's not freeware, don't even give me the link Try this excellent freeware: www.vim.org Haim

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

                                    vi for windows eh? Nish


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

                                    1 Reply Last reply
                                    0
                                    • K Kannan Kalyanaraman

                                      Nish - Native CPian wrote: Nope! If it's not freeware, don't even give me the link Oh ! I didn't know that you are looking for freeware :-) Anyway, you can withstand the pain for installing/removing you can try downloading the eval. thanks i got the flashplayer. Kannan

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

                                      Kannan Kalyanaraman wrote: Anyway, you can withstand the pain for installing/removing you can try downloading the eval. Or a crack ;-) Nish


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

                                      1 Reply Last reply
                                      0
                                      • L loket

                                        ...hmmm, and i who tought you where a programmer. ;P

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

                                        loket wrote: hmmm, and i who tought you where a programmer. :((


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

                                        1 Reply Last reply
                                        0
                                        • 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
                                          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