Sublime Forum

Can't Type Commas In Haxe Files

#1

I’m using Sublime Text 2, with Haxe plugins. ST2 was working normally until tonight, at which point it stopped letting me type commas in my files.

It will let me do it in certain circumstances (inside string literals, for instance) but not in most places in my files. If I create a new file, or edit a non-haxe file, it works normally. I can’t think of anything I’ve activated by mistake - I was wondering if anyone had come across this in ST2 before or if it’s entirely specific to this environment.

Cheers!

0 Likes

#2

You can try to track down the issue by running ‘sublime.log_commands(True)’ in sublime’s console.
If some command is actually trapping the comma it will show up.

hope it helps :smile:

0 Likes

#3

This is so weird, I started having the exact same issue today, worked fine before then. I also cant type ‘(’. The closing bracket works fine, just not the opening bracket.

0 Likes

#4

This seems related to a package update, maybe they changed some key bindings that now traps out the opening bracket, for example Sublimerge binds the “” (ctrl+alt+= on US qwerty is the opening square bracket on a qwerty italian keyboard) to a command… try debug with log_command to see if that’s the case :wink:

0 Likes

#5

Oh you’re right, I can’t type opening brackets either.

Hngh. I’ll try the log_command thing tonight. Thanks for the suggestions, folks.

0 Likes

#6

Okay, this is what log_command says:

command: haxe_hint {"input": "("} command: haxe_hint {"input": ","}

Needless to say it doesn’t say this when I type a normal character. Any idea what this is, and how I can kill it dead? :smile:

haxe_hint is mentioned here:

github.com/clemos/haxe-sublime- … ime-keymap

And you can see bindings for “(” and “,”. I’m just not sure what I can/should change. Is this just a bug, I should contact the plugin developer?

EDIT - I’ve found mention of the issue here: github.com/clemos/haxe-sublime- … issues/124

The proposed solution was ‘switch to Sublime Text 3’ so…

0 Likes

#7

Well, I never used haxe package but it seems calling the haxe_hint command on keypress of “(” and “,” … I suppose this command should show something like auto completion or such, but for some reason it just silently dies… You can try to see at package’s github page if there are issue tickets regarding this behaviour, or open a ticket about it.

0 Likes

#8

[quote=“mtrc”]EDIT - I’ve found mention of the issue here: github.com/clemos/haxe-sublime- … issues/124
The proposed solution was ‘switch to Sublime Text 3’ so…[/quote]

Well, so it seems they broke st2 support for this hint command, this explains why nothing shows up when you hit the 2 keys, if that hinting is not crucial for you and if is the only thing that is broken you can simply remap the command to other key binding or comment the 2 records in the package’s keymap… :wink:

0 Likes

#9

This is happening to me using Sublime Text 3, with a current version of the Haxe bundle.

For what it is worth, Package Control doesn’t run on the same system (Ubuntu 14.04), this may be caused by a different executing version of Python? Not sure if that is related to the issue.

This machine is also running Ubuntu 14.04, though, with the same version of Sublime Text 3, and it works… but perhaps this is because I also have an old version of the Haxe bundle, here.

0 Likes

#10

Hi,
I’m the maintainer of the Haxe plugin.
There have been a bug with ST2 recently, but I think I fixed it a few days ago.
In any case, typing “(” and “,” does trigger methods in the plugin, and the fact that they are blocking is very likely a symptom of a bug in the plugin, not in ST.
Can you please file an issue at my github repo, with output from the ST Console (if any) ?
github.com/clemos/haxe-sublime- … issues/new
Best,
Clément

0 Likes