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

[Bug] Custom symbols insert incorrect, if “\\” is "word_separators" value #19

Closed
Kristinita opened this issue Mar 2, 2017 · 3 comments

Comments

@Kristinita
Copy link

Kristinita commented Mar 2, 2017

1. Summary

If I insert my custom symbol, slash \ insert for me.

2`. Settings

My User/UnicodeMath.sublime-settings:

{
    "symbols": {
        "ballot_box": "\u2610",
        "ballot_box_with_check": "\u2611"
    }
}

Part of my User/Preferences.sublime-settings:

"word_separators": "./\\()\"'-:,.;<>~!@#$%^*|+=[]{}`~?_"

3. Expected behavior

If I delete \\ into my word_separator parameter:

I print \ballot_box in test.md file → I press Tab insert for me.

4. Actual behavior

I print \ballot_box in test.md file → I press Tab\☐ insert for me.

5. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

I get actual behavior for my custom symbols, but I get expected behavior, if I delete \\ into my word_separator parameter.

I change \u2610 to \\u2610 in my file User/UnicodeMath.sublime-settings file → I get actual behavior.

6. Environment

Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126

Thanks.

@mvoidex
Copy link
Owner

mvoidex commented Mar 25, 2017

It works as expected if you write \ballot_box and then press space (in this case UnicodeMath's command is called). But it leaves \ when you select completion item and press enter - in this case text is replaced by SublimeText (not plugin).
Seems, that SublimeText sees ballot_box as two words (as long as _ is now word separator).

If this is acceptable solution for you, just don't use _ in symbol names:

{
    "symbols": {
        "ballotBox": "\u2610",
        "ballotBoxWithCheck": "\u2611"
    }
}

@Kristinita
Copy link
Author

@mvoidex , thanks, it works for me! Please, write in README.MD about it.

(I'm don't close this issue, because maybe it will be fixed.)

Thanks.

mvoidex added a commit that referenced this issue Mar 27, 2017
@mvoidex
Copy link
Owner

mvoidex commented Mar 27, 2017

I'll close it, because i don't think it can be fixed within plugin

@mvoidex mvoidex closed this as completed Mar 27, 2017
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