Snippets for unicode syntax #42

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

nikita-volkov commented Mar 28, 2013

This allows to comfortly type in haskell unicode syntax, e.g., typing

"-" + ">" + TAB

will result in

"→ "

getting inserted.

For more info on unicode syntax see this and this.

It makes sense to extend this with support for this library in future.

@nikita-volkov nikita-volkov Snippets for unicode syntax
This allows to comfortly type in haskell unicode syntax, e.g., typing
"-" + ">" + TAB will result in "→ " getting inserted. For more info on
unicode syntax see this:
http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.htm
l#unicode-syntax
ef8492b
Owner

mvoidex commented Mar 28, 2013

This can be also done by https://github.com/mvoidex/UnicodeMath plugin, which allows input many Unicode symbols via '' and its name, e.g. \forall, \all -> => etc.

Contributor

nikita-volkov commented Mar 28, 2013

The snippets approach still seems easier and more consistent to the standard Sublime Text workflow. It also allows to modify the already typed in code by positioning the cursor after a token and just hitting TAB. And all it needs to work are standard SublimeText features - no custom plugins required.

Owner

nh2 commented Mar 28, 2013

Whichever approach we take, we should try to make sure that is optional. I know that many Haskellers like unicode code, but equally many dislike it.

If we use plain snippets, is there a way to disable them?

Contributor

nikita-volkov commented Mar 28, 2013

@nh2 I think there's much more of the ones who dislike it. Nevertheless, I've had those snippets in my custom configuration for quite some time while coding without using them, and the thing is they turned out to be absolutely unintrusive, because never in my experience have I inputted a TAB after a token or an operator like that. So I decided to share it with the other folks, because it turned out to be a practical approach.

So, basically the need to disable the snippets shouldn't ever arise, however, a user can always delete the snippets folder, if he wants, although I guess it will still get restored with the next SublimeHaskell update.

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