tern icon indicating copy to clipboard operation
tern copied to clipboard

Question: def.json with locale source files

Open medoni opened this issue 8 years ago • 0 comments
trafficstars

Hi, How can I jump to a locale file definition (with correct line) in sublime(tern_for_sublime)?

My tern definition.json looks like this:

{
    "!name": "mylib",
    "Foo": {
        "Bar": {
            "!type": "string",
            "!doc": "some doc",
            "!url": "file://C:/.../Foo/Bar.js"
        }
    }
}

When I jump to the definition Bar, sublime opens the local file in a new tab(sublime is default app for js files).

When I change the !url to file://C:/.../Foo/Bar.js:23 (includes the line number) this doesn't work anymore. sublime/tern opens the browser(IE) with an invalid url.

I find in source there is !span property. But I cannot handle it:

"!url": "file://C:/.../Foo/Bar.js",
"!span": "88[23:1]-88[23:1]"

This opens an new/empty mylib file in sublime. How can I achieve this? It this possible?

thx

medoni avatar Oct 10 '17 18:10 medoni