Skip to content

ST3 NameError global name 'view' is not defined #169

@Maxtermax

Description

@Maxtermax

I just install tern for sublime by download the repo inside the packages folder of sublime text 3 then run
npm install then i try the demo located at: /Packages/tern_for_sublime/test/demo/simple/test.js it looks like this:

// Use ctrl-space to complete something
co
document.body.a 

// Put the cursor in or after an expression, press alt-o to
// find its type

var foo = ["array", "of", "strings"]
var bar = foo.slice(0, 2).join("").split("a")[0]

// Works for locally defined types too.

function CTor() { this.size = 10 }
CTor.prototype.hallo = "hallo"

var baz = new CTor
baz.

// You can press alt-space when the cursor is on a variable
// name to rename it. Try it with CTor...

// When the cursor is in an argument list, the arguments
// are shown below the editor.

[1].reduce(  )

When a try to use the intellisense dont work, so look the logs in the sublime text console and notice that in: /Packages/tern_for_sublime/tern.py crash in the line 598 because NameError: global name 'view' is not defined.

I am using:

  • node 8.2.1
  • npm 5.3.0
  • linux Ubuntu 14
  • python 2.7.12

I am not sure but a think that the problem maybe is for the python version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions