In order to get node.js completion with tern, you will need a .tern-project
file. A sample file is included below.
Place the .tern-project
file inside your project directory. You can also have a global ~/.tern-project
file located in your home directory
- Another installation guide http://ahalbert.nfshost.com/Tech/Installing_Tern_for_Vim.html
- Tern keyboard shortcuts in vim http://usevim.com/2013/05/24/tern/
- PDF of shortcuts http://usevim.com/files/tern_keyboard.pdf
so i had this same issue again and googled my own answer from half a year ago
which didn't help...
make sure you use tern with
filetype=javascript
.tern doesn't register its commands for other filetypes, in my case it was typescript.
obvious now but easy to forget when often switching between js & ts.