2 Replies Latest reply on Jul 1, 2014 6:13 AM by 1591074

    Backspace to delete one space only?

    1591074

      I tried to search the forums but I can't find an answer.

       

      SQL developer has some quirk where pressing backspace goes to the nearest Tab column if the preceding characters are only spaces. For example in my setup, I think Tabs are configured to move 3 spaces. So here's what happens

       

      backspace at column 3, goes to column 1

      backspace at column 4, goes to column 1

      backspace at column 5, goes to column 4

      backspace at column 6, goes to column 4

      backspace at column 7, goes to column 4

      backspace at column 8, goes to column 7

      etc.

       

      It messes up my formatting because I often have to press additional spaces after I press a backspace because it SQL Developer removes too many spaces. I want backspaces to delete exactly one character.

       

      Many thanks!

        • 1. Re: Backspace to delete one space only?
          Gary Graham-Oracle

          It seems that regardless of how whitespace is added (blanks or tabs) in the editor, each backspace ...

          1. Destroys leading whitespace according to the tab setting, if the number of remaining leading spaces >= to this setting, otherwise one at a time.

          2. Destroys embedded whitespace one space at a time. 

          When saving or loading a file, the editor ...

          1. Writes out any whitespace as a string of blanks of the displayed length.

          2. Reads in any blanks, leading or embedded, and displays them "as-is".

          I suppose this behavior, apparently as-designed, was meant as a convenience rather than an annoyance.  However, as Jeff implies in one of his blogs, you cannot please all the people all the time: http://www.thatjeffsmith.com/archive/2011/12/how-to-configure-tabs-in-sql-developer/

           

          Configuring the tab setting to 1 would solve this issue, but that cure could be worse than the disease.

           

          Regards,

          Gary

          SQL Developer Team

          • 2. Re: Backspace to delete one space only?
            1591074

            Hi Gary,

             

            Thanks! That's perfect for me since I never liked tabs anyway, since different text editors have different tab setting, so a perfectly aligned code in one's computer would be a mess in another's. Thanks for showing me how to set the tab length. I had the same idea except I couldn't figure out where to set it.

             

            Regards

            Alvin