emmetio / sublime-tern

TernJS plugin for Sublime Text
222 stars 15 forks source link

support sublime text 3 #30

Open santagada opened 10 years ago

santagada commented 10 years ago

It appear that it doesn't support sublime text 3 yet, is there any chance of it happening?

janhancic commented 10 years ago

:+1:

sergeche commented 10 years ago

ST3 is supported from the very first release

janhancic commented 10 years ago

But you can't install it trough package control as it's marked as ST2 only. I'll try installing it manually.

sergeche commented 10 years ago

It was mistakenly marked as ST2-only plugin. I’ve sent PR to make it appear for ST3 too

janhancic commented 10 years ago

I can install it manually. But it's unusable, it locks up every time I enter something. Granted we have a fairly large codebase so I guess it's not ready yet for big projects. Shame :/

sergeche commented 10 years ago

http://emmet.io/blog/sublime-tern/

janhancic commented 10 years ago

I've read that and only included the files I actually want. Still no dice I'm afraid.

hnsl commented 10 years ago

The basic functionality works fine in SL3 for me but it doesn't integrate well with new SL3 features. SL3 has a built in jump stack as well as go to definition support. So I have to rebind by go to definition button ("goto_definition") to use the "tern_jump_to_def" command instead. When I use "tern_jump_to_def" the sublime.active_window().open_file doesn't record the current cursor position before jumping for some reason so the SL3 built in jump stack doesn't work. This could be a bug in SL3 though. This means that I have to use "tern_jump_back" instead which works okay but I can only go back from tern definition jumps and not any jump. Also there is no jump forward.

I also had to patch TernJumpToDef() to remove that annoying error message that pops up when the definition doesn't exist.