SublimeText / PackageDev

Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
MIT License
436 stars 83 forks source link

Syntax: Update input helper #303

Closed deathaxe closed 4 years ago

deathaxe commented 4 years ago

This PR proposes to ...

  1. align the caret with the match keyword when pressing enter.

    The result is:

    - match: pattern
     |

    Before it was:

    - match: pattern
    |

    Note: This might also be achieved by indentation rules, but I had no luck with them so far.

  2. trim spaces after push:, set:, ... if enter is pressed and adds an indented line afterwards.

    Note: The macro works only for this special purpose as delete_word also removes the colon.

  3. removes automatic insertion of linefeed when typing colon after context names as it often ends in empty lines after editing context names.