The Welkin Suite Forum

Delete key to delete multiple spaces when "Insert spaces" option set for tabbing.



Delete key to delete multiple spaces when "Insert spaces" option set for tabbing.

  • Please log in to reply

#1
windows version welkinsuite

donnie745

    Posted 16 Nov 2017

    Hi there,

    I currently have my IDE set up to insert 4 spaces for each tab. It's a pretty minor request for me to post but would be nice if the backspace-delete/(forward)delete key would delete to the previous/next tab point when there are only spaces separating the current cursor position and the previous/next tab point. So for example if I entered a new line and tabbed one more tab than I meant to I'd just have to press the backspace-delete once to get back to the correct indentation rather than pressing the backspace-delete key (in my case) 4 times.

    Not sure if this has already been mentioned in a previous forum post but would also be nice if on pressing the Enter/Return key the new line automatically indents to the correct position based on whether the entered line has entered a new {} scope or not.


    Cheers,

    Donnie




    5 replies to this topic

    #2

    vlgubanovich

      Posted 16 Nov 2017

      Hi Donnie,


      We've missed your feature requests :)

      First I'll answer about auto-indenting on the newline - absolutely a must! And we will do it in one of the first batches of improvements for Apex. It's a very small thing, but adds so much comfort :)


      Regarding the backspace/delete to delete the whole "indent" if set to spaces - interesting. To be honest I'm not sure that implementing it would be easy (as we need to cover many cases). No promises on this feature, but I'll add it to the backlog and will consider it with the team.


      Thank you once more for your ideas!

      Vladimir


      Vladimir Gubanovich
      Head of Product
       
      The Welkin Suite
      skype id: vladimir.gubanovich
      e-mail: vladimir.gubanovich@welkinsuite.com


      #3

      donnie745

        Posted 17 Nov 2017

        Thanks Vladimir. Yeah took a while to go through finance to get our licenses sorted so had a couple of weeks back on Mavensmate; good to be back pestering you again;-)

        Even if the multiple space deletion functionality was simplified to just work for backspace delete in the cases where the the whitespace between the cursor position and the previous carriage-return or non-whitespace-character consisted wholly of space characters and the number of spaces in that gap was a multiple of the configured indent size (so if the cursor wasn't positioned exactly on an indent column from the last carriage-return/non-whitespace character then the delete would revert to just deleting a single character), then that functionality would be covering the most frequently used case and would be very useful.


        Cheers,

        Donnie



        #4

        vlgubanovich

          Posted 17 Nov 2017

          Hi Donnie,


          We're really happy that you're back :)

          You're right - the simplified way with just backspaces deletion should be simplet to implement, so we'll keep is as an option.

          Just out of curiosity - won't the proper auto-indenting remove the need in such "indent deletion" for you?


          Thank you,

          Vladimir


          Vladimir Gubanovich
          Head of Product
           
          The Welkin Suite
          skype id: vladimir.gubanovich
          e-mail: vladimir.gubanovich@welkinsuite.com


          #5

          donnie745

            Posted 20 Nov 2017

            Hi Vladimir,
            Hope you had a good weekend. You make a good point about the auto-indentation, it would reduce the frequency where this would be useful although there probably would still be instances when editing a statement over multiple lines (e.g. formatting a large SOQL statement over multiple lines) where the delete multiple spaces might come in handy (saving the hassle of selecting the line for the shift-tab unindent). It's a bit of an edge case though I suppose so once the auto-indenting is implemented I wouldn't be too fussed if it was deemed not important enough to implement.
            Just out of interest would the auto-indentation functionality also apply indentation fixing on an entered line when enter/return key is pressed in addition to ensuring the cursor is at the correct position on a newly entered line? I guess if it was to try to post-fix entered lines it would have to avoid applying indentation fixing when the line is part of a multi-line statement and not the first line of the statement (so the example of where I am entering a large SOQL statement and wish to format it in a particular way, it would be annoying if the indentation was auto-corrected).


            Cheers,

            Donnie



            #6

            vlgubanovich

              Posted 20 Nov 2017

              Hi Donnie,


              Thanks for the additional details, it makes sense.

              Good point about the auto-indentation, tbh. Were thinking about the auto-format&auto-indent on statement/block completion, so I think we'll take into account the case you've mentioned (or I'd say cases, as it's kinda rule). At least for now your suggestion about the multi-line statements looks absolutely correct :)


              Thank you,

              Vladimir


              Vladimir Gubanovich
              Head of Product
               
              The Welkin Suite
              skype id: vladimir.gubanovich
              e-mail: vladimir.gubanovich@welkinsuite.com





              Boost Your Productivity. Get Started Today

              Try Free Trial