5 ms·
This is quite stupid. Saying emacs is better but showing that emacs do actually the same sublime text mistake.... Emacs is extensible; ST too.
by h1fra 13y ago
This is quite stupid.
Saying emacs is better but showing that emacs do actually the same sublime text mistake....
Emacs is extensible; ST too.
- caipre 13y agoAFAIK, ST2 doesn't have a plugin for a Javascript interpreter (though I haven't used ST2 for over a year now). You could extend the javascript.sublime-language file, but that only supports regexes so you won't have the same context as with the AST. Your main point stands though: all major editors have the ability to add plugins to achieve this same functionality.
- shawndumas 13y agohttp://ternjs.net http://ternjs.net Tern is a stand-alone code-analysis engine for JavaScript. It is intended to be used with a code editor plugin to enhance the editor's support for intelligent JavaScript editing. Features provided are: *Autocompletion on variables and properties *Function argument hints *Querying the type of an expression *Finding the definition of something *Automatic refactoring There is currently Tern support for the following editors: *Emacs *Vim *Sublime Text *Brackets (built in to the base editor)
- coldtea 13y ago>AFAIK, ST2 doesn't have a plugin for a Javascript interpreter Yes, but the important thing is that it CAN have one, same as Emacs could. For example, it has a Go plugin which uses the Go AST.
- mickeyp 13y agoI think you're misunderstanding it. JS2-mode is a few years old and a generic javascript mode with a built-in AST and all the goodness that comes from that. It does not inherently understand require.js. Nor does ST. With Emacs's JS2-mode, thanks to its AST, it is possible to augment the library so that it does understand require.js -- and the author does so without resorting to piles-upon-piles of regexp hacks.