Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Delete whitespace intelligently or backspace by indentation, e.g. delete four spaces that function as 'a tab' #36

Description

@kenny-evitt

See LightTable/LightTable#548 for the original issue. The original comment:

So currently, if I configure LT to insert spaces rather than tabs, what happens when I try to delete the spaces is that I have to delete the spaces one by one, rather than deleting them as tabs (delete 4 spaces at once in my case). Could LT intelligently detect when I want to delete a tab width of spaces?

Activity

  1. cldwalker commented on Dec 7, 2015

    @cldwalker
    Member

    From LightTable/LightTable#548:
    Open to a pull request on Python plugin that does this. CodeMirror provides indentLine which provides a "subtract" to do this. The keybinding would need to be bound to backspace, scoped to just python files and map to a command that does something like the following (haven't tested it in a python file):

    (let [ed (pool/last-active)]
          (.indentLine (editor/->cm-ed ed) (.-line (editor/cursor ed)) "subtract" true))
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions