howl-editor / howl

The Howl Editor
http://howl.io
Other
712 stars 68 forks source link

cursor-home and beginning of text #398

Closed ghost closed 6 years ago

ghost commented 6 years ago

Current behavior always moves the cursor to the very beginning of the line which makes editing indented code rather tedious. The least astonishing behavior (at least while editing code) may be to move the cursor to the beginning of text on first press and then to the beginning of the line on a subsequent press.

refi64 commented 6 years ago

FWIW you can just hit Home and then Control+Right to jump to the beginning of the text.

shalabhc commented 6 years ago

I think ctrl_home going to start of line, irrespective of white-space, is pretty standard behavior across most editors. But you could customize this to your desired behavior with the following code in your init.moon:


howl.bindings.push
  home: ->
    howl.command.cursor_home!
    howl.command.cursor_word_right!

This runs the two commands @kirbyfan64 mentioned above.

nilnor commented 6 years ago

@stutonk I believe that the existing cursor-home-indent-auto command might be what you want, that one toggles between first and first non-blank column for a line. Personally I don't use home and would be open to change the default binding if it seemed like it was generally desired.

ghost commented 6 years ago

Confirmed that cursor-home-indent-auto does the job.