Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line indentation not working #10

Open
snakeneedy opened this issue Apr 20, 2018 · 2 comments
Open

Multi-line indentation not working #10

snakeneedy opened this issue Apr 20, 2018 · 2 comments

Comments

@snakeneedy
Copy link

snakeneedy commented Apr 20, 2018

The situation is, with other lines selected, when I also select:

  • :\n
  • \n after : (without :)
  • : at the end of line

, multi-line indentation can't work using tab.

I can only disable this package to make it functional.

version: ST3 Build 3143


Add: It looks good on markdown syntax, but bad on others.

@kpym
Copy link

kpym commented Oct 22, 2018

I have the same issue.
After investigating a little bit it looks like that the tab trigger from sublime-keymap file :

{ "keys": ["tab"], "command": "github_emoji_auto_complete", "args": {}, "context":
    [
      { "key": "preceding_text", "operator": "regex_contains", "operand": ":$", "match_all": true }
    ]
  }

match muti-line selections that has one line with : at the end.
To overcome this you can replace "operand": ":$" by "operand": ":\\z" because \z looks for end of selection and $ match also end of line.

@kpym
Copy link

kpym commented Oct 22, 2018

Actually, I think that it is even better to check if the selection is empty. So for example Default (Windows).sublime-keymap could be replaced by

[
  { "keys": ["tab"], "command": "github_emoji_auto_complete", "args": { "isCommitEmoji":true }, "context":
    [
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "@\\z", "match_all": true }
    ]
  },
  { "keys": ["tab"], "command": "github_emoji_auto_complete", "args": {}, "context":
    [
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": ":\\z", "match_all": true }
    ]
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants