How do I install Tern on Sublime Text 3 on Windows?

Asked 1 years ago, Updated 1 years ago, 79 views

I can only find the MAC information, but with Windows 10, do I put the tern_for_sublime-master folder in the path below and install it in npm?

Reference site https://liginc.co.jp/312755

If you look at the reference site
First,
to C:\Users\user\AppData\Roaming\Sublime Text3\package Should I just insert the tern_for_sublime-master folder?

Next, since I use gulp, the node itself is included, so what kind of command should I type in Windows 10 using C:\Users\user\AppData\Roaming\Sublime Text3\package\tern_for_sublime-master as the current directory?

npm install tern isn't it?

I tried to follow the comments, but I got an error as below.

AppData\Roaming\Sublime Text3\Packages\tern_for_sublime-master>npm install
npm WARN enoent ENOENT: no such file or directory, open'C:\Users\h\AppData\Roaming\Sublime Text3\Packages\tern_for_sublime-master\package.json'
npm WARNtern_for_sublime-master No description
npm WARNtern_for_sublime-master No repository field.
npm WARNtern_for_sublime-master No README data
npm WARNtern_for_sublime-master license field.

For some reason, it was nested, so I tried not to nest the folder, but it said install for a moment.

As a result
Preferences > Package Settings > Tern > Settings – User
to

{
    "tern_argument_hints": true,
    "tern_output_style": "status",
    "tern_argument_completion": true,
    "auto_complete": true,
    "auto_complete_triggers": [
        {"selector":"text.html", "characters":"<"},
        {"selector":"source.js", "characters":."."}
    ]
}

Thanks to you, I was able to add .
Only
document.getElementsByClassName
When I hit the control and press the space, it doesn't come out ( ).
I don't feel much change from before I did this.
Can you keep it so that I can tell if it's an argument or a substitute?

dcmt.addEvtLisr is
dcmt.addEventListener
changes.Can I think of it as usable?

console.log(i);
The following links and English explanations such as log() appear on sub-lime text 3.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log

Perhaps the installation itself is complete.

Even if you type document.getElementsByClassName and press controls and spaces,
There is no argument or substitution hint.

windows sublimetext

2022-09-30 19:57

1 Answers

First,
to C:\Users\user\AppData\Roaming\Sublime Text3\package Should I just insert the tern_for_sublime-master folder?

If git has not been deployed, that's right.

Next, I use gulp, so the node itself is included, so Windows 10 is
C:\Users\user\AppData\Roaming\Sublime Text3\package\tern_for_sublime-master as the current directory.

Install the Node module with npm install.At this time, Tern is installed in the node_modules folder.

Additional information:
console.log() says it is complementary and explained, so the installation is complete.
By default, only those defined in ECMAScript and those standard in Node.js seem to be complemented with priority on versatility.
If you are using complements for web browsers such as document or Document.addEventListener(...), you will need the following configuration files for your project folder or default Turn settings:

.tern-project:

{
  "libs":[
    "browser", // Complementary settings for web browsers
    "jquery" // Complementary Configuration for jQuery
  ]
}

The default project folder is called default_project_dir in the folder where you installed Tern for Sublime.
Try restarting Sublime Text by installing the .tern-project with the above JSON.


2022-09-30 19:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.