Skip to content

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

Closed

Description

@Kristinita

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.

Activity

  1. mvoidex commented on Mar 25, 2017

    @mvoidex
    Owner

    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"
        }
    }
    
  2. Kristinita commented on Mar 26, 2017

    @Kristinita
    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.

  3. added a commit that references this issue on Mar 27, 2017
  4. mvoidex commented on Mar 27, 2017

    @mvoidex
    Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions