Add an option to disable “quick jump” between indents

In Atom, it’s not possible to begin or end a selection at the midpoint of an indent, because the caret can’t be jumped there. But as a text editor, I think it should be able to do anything a normal text editor can do, regardless of whether it’s meaningful or not.

My suggestion: leave the default “as is”, but add an option to disable the “quick jump”.

14 thoughts on “Add an option to disable “quick jump” between indents

  1. Not being able to position my cursor is not a bug??
    I turned of soft tabs in settings – shouldn’t that at least disable this behavior? I’d like to be able to disable this so I can write my own package that adds the behavior I want.

  2. Please, let the Principle of Least Surprise be your guide here: I’m +1 for either making ‘quick jump’ a user option, &/or disabling/deprecating ‘quick jump’ all together. No good reason for a text_editor to treat leading whitespace that weirdly!

  3. My personal take is that backspace should delete a “whole softtab”, but cursor movement should treat them like individual spaces. Maybe delete should also delete individual spaces.

    Just a thought to illustrate that there may be options other than the ones discussed here.

  4. Personally I think the best solution would just be to give us an option/setting to make soft-tabs non-atomic. (As suggested by multiple people)
    I’d be fine with that.

  5. This behavior is crazy. Not every line in a file must line up with the tab lines.

    For example (python):

    def foo():
        This thing works like this:
                       / \
                      b   c

    Try playing around with that ascii graph in Atom with indent size set to 4. It’s… unnecessarily difficult.

  6. +1
    I spent a good bit of time trying to figure out (with invisibles turned off) why I couldn’t get Atom to insert spaces instead of tabs, even though I triple checked all my settings.

    As a last resort, I checked in another editor and found that in fact, they were spaces, but the behavior of my arrow key in Atom made them seem very much like tabs.

    This is a very unintuitive feature, and I’d like a way to turn it off.

  7. I have to say – I’ve never had such difficulty configuring an editor to have an intuitive arrow key behavior. I think the reason why people even prefer soft tabs in the first place, is so that they can later move in between spacings one character width at a time. I’ve used every popular editor, and none of them seemed to confuse me like Atom’s behavior does. There are some comments/alignments that I simply cannot even create/edit without using atom-vim-mode shortcuts to operate on individual characters.

    I would propose: Even with soft tabs, the arrow keys (at the very least, but you could also imagine the backspace behaving similarly), will move between individual characters.

  8. +1 There’s deep wrongness here. Atom’s whitespace handling seems seriously broken by design. (This is not the only such issue.)

  9. Personally, I feel it should work like this:

    • If soft-tab mode is enabled
      • Treat spaces as spaces in all cases except as noted below
      • between new line and content start
        • tab
          • insert spaces to closest tab stop
        • shift-tab
          • delete X spaces as defined by tab size in settings (does not delete new line)
        • backspace
          • delete to closest tab stop
        • delete
          • delete one character ahead
      • after content start
        • tab
          • insert X spaces as defined by tab size settings
        • shift-tab
          • insert X spaces as defined by tab size settings
        • backspace
          • delete one character behind
        • delete
          • delete one character ahead
    • If soft-tab mode is disabled
      • Treat spaces as spaces in all cases.
  10. Is effe882 supposed to resolve this issue? There must be some related commits that actually implement the atomicSoftTabs option in order for this to be “Closed”.