Getting full JS autocompletion under Sublime Text

后端 未结 7 609
灰色年华
灰色年华 2020-11-30 16:56

I just installed the Sublime Text under Windows Vista, and even following the advice given in this post, namely to explicitly set View > Syntax > JavaScript >

7条回答
  •  北海茫月
    2020-11-30 17:17

    As already mentioned, tern.js is a new and promising project with plugins for Sublime Text, Vim and Emacs. I´ve been using TernJS for Sublime for a while and the suggestions I get are way better than the standard ones:

    enter image description here

    Tern scans all .js files in your project. You can get support for DOM, nodejs, jQuery, and more by adding "libs" in your .sublime-project file:

    "ternjs": {
        "exclude": ["wordpress/**", "node_modules/**"],
        "libs": ["browser", "jquery"],
        "plugins": {
            "requirejs": {
                "baseURL": "./js"
            }
        }
    }
    

    enter image description here

提交回复
热议问题