bluemmb's blog

By bluemmb, history, 9 years ago, In English

Maybe this is so strange and negligible but I have problem with this :

In many IDEs and Editors TAB character is equal to 4 spaces but in codeforces submission views it is equal to 8 spaces.

It isn't matter when you use it just for Indenting codes. but for more readability I keep comments in a vertical line with tab and sometimes use comments for visualize something in code and because of this problem they will be ruin in submission page so I must copy code in my editor again and view it.

VisualStudio and some other use of exactly 4 space characters instead of tab so this is ok also. but Notepad++ , Sublime , ... use of tab character itself.

Can you consider this? thanks for great works.

  • Vote: I like it
  • +38
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Most IDE / text editors have options to insert spaces instead of tabs when you press tab --> your code will looks the same everywhere.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    While this is true, it also has some negative effects, such as then when you press tab, and realize you do not want the tab, you must press delete four times to delete the four spaces then, rather than once to delete the tab. Maybe there is some way to fix this, but I have not seen it in most editors.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      I tested with Sublime text & Atom, and both editors delete all 4 spaces when I press delete. Maybe you should consider switching to one of these.

      • »
        »
        »
        »
        9 years ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        ok thanks . I accustom to Notepad++. it have this option and haven't unindent backspace but this plugin enable it.

        Anyway, I don't see any problem with having standard submission viewer in codeforces. do you?

        sorry for my poor english

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      Actually, in most editors (I think) there is an option to delete all 4 spaces via one Backspace. E.g. in Code::Blocks there's a checkbox "Backspace unindents".

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Any way to do this in Far Manager?

        • »
          »
          »
          »
          »
          9 years ago, # ^ |
            Vote: I like it +1 Vote: I do not like it

          Have no idea. Vim forever.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      in some IDEs pressing shift+tap works, try it

»
9 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

In sublime you can edit the tab length

View >> Indentation..

Or

Preferences >> Settings-Default. ( and then change the tab_size )

I hope this will help..

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Tanks for your help . but I don't want to find way to fix this in our editors.

    I am saying that this is good in submission viewers, Tab be equal to 4 spaces.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I wrote a message for Mike and Zlobober for check this blog . but maybe they are so busy to check messages. How I can send to codeforces team members this request ?