Skip to content

"Smart" Home key #3012

@sven-frotscher

Description

@sven-frotscher

Describe the feature and the current behavior/state

Currently, pressing the Home key puts the cursor the beginning of the line, before any indentation characters. To edit the actual beginning of the line (after the indentation), you have to move the cursor manually or using Ctrl+Right Arrow.

I'd like presses of the Home key to alternate placing the cursor at the end of the indentation and the beginning of the line (= before the indentation). This would save time (fewer cursor movements), while still allowing you to increase or decrease the amount of indentation with Tab or Shift+Tab, respectively.

If you deem this feature intrusive, you may place it behind a configuration option (e.g. in the Editor category).

Any Other info

Quite a few editors/IDEs have the feature I am requesting here. Geany, for example, has the following setting, which is enabled by default:

"Smart" home key

When "smart" home is enabled, the HOME key will move the caret to the first non-blank character of the line, unless it is already there, it moves to the very beginning of the line. When this feature is disabled, the HOME key always moves the caret to the start of the current line, regardless of its current position.

IDEs from Jetbrain (e.g. Pycharm) have the following setting:

Home moves caret to first non-whitespace character

When this checkbox is selected, on pressing Home, the caret is positioned at the first non-whitespace character of the current line. Pressing Home subsequently moves the caret from the Smart Home position to the first column and back.

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