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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent snippet expansion #1560

Open
philiprbrenan opened this issue Jul 26, 2017 · 1 comment
Open

Inconsistent snippet expansion #1560

philiprbrenan opened this issue Jul 26, 2017 · 1 comment

Comments

@philiprbrenan
Copy link

Using the following snippets I am able to expand 饾澃 to alpha but unable to expand < to <> unless I add < to wordChars which was not needed for 饾澃 which seems inconsistent? I think it would be helpful if symbols could be expanded in situations like a< without requiring a leading space, perhaps if they were listed in a symbol: "expandTheseItemsWithOutALeadingSpace" ?

[Special]
brace_open=\n{\n\t
brace_close=}\n
block=\n{\n\t%cursor%\n}
block_cursor=\n{\n\t%cursor%\n}\n%cursor%
wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#$%&:.

[Perl]
饾澃=alpha
<=<>

@elextr
Copy link
Member

elextr commented Aug 27, 2017

Snippet names need to be limited otherwise there is no way to tell when to stop searching backwards for the snippet name. The use of wordchars is intended to exclude programming language operator characters.

But since its impractical to list all Unicode code points in wordchars, all non-ASCII code points are included as well.

The manual could be updated to be more explicit.

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

No branches or pull requests

2 participants