3 ms·
The point is that js2-mode interprets javascript which enables it to offer much more exact syntax highlighting and navigation than purely regexp based approache
by bjourne 13y ago
The point is that js2-mode interprets javascript which enables it to offer much more exact syntax highlighting and navigation than purely regexp based approaches. FWIW, js2-mode is an exception and most of emacs highlighting comes from regexps via font-lock mode. The author could have made the same point about Visual Studio vs other editors as the former parses syntax which most others don't.
- mickeyp 13y agoIndeed. But it's still a nice thing to be able to do; this is, after all, the Emacs way -- for good or ill! One useful technique to make Emacs appear cleverer than it is vis-a-vis code searching and navigation is to navigate by syntax highlighting - most of which is assigned one of several types (constant, keyword, statement, etc.) -- and simply use that. It's hardly perfect, but it's good enough for 90% of the basic navigation you need to do.
- S4M 13y ago>One useful technique to make Emacs appear cleverer than it is vis-a-vis code searching and navigation is to navigate by syntax highlighting - most of which is assigned one of several types (constant, keyword, statement, etc.) -- and simply use that. How do you do that?