Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use tern with vim for node.js development.
{
"libs": [
"browser",
"underscore",
"jquery"
],
"plugins": {
"node": {}
}
}
"""""""""""""""""
" Tern settings
"""""""""""""""""
Bundle 'marijnh/tern_for_vim'
let g:tern_show_argument_hints='on_hold'
" and
let g:tern_map_keys=1
@joeyzhao0113

This comment has been minimized.

Copy link

@joeyzhao0113 joeyzhao0113 commented Jan 9, 2017

After set the .vimrc as below:

"""""""""""""""""
" Tern settings
"""""""""""""""""
Bundle 'marijnh/tern_for_vim'
let g:tern_show_argument_hints='on_hold'
" and 
let g:tern_map_keys=1

I will get error when run vim command:

E492: Not an editor command: Bundle 'marijnh/tern_for_vim'
Press ENTER or type command to continue

Is there anything need to be changed in this configuration file?

@argshook

This comment has been minimized.

Copy link

@argshook argshook commented Jan 12, 2017

@joeyzhao0113 hey man you most probably don't have a plugin manager which has Bundle command or don't have any plugin manager at all. google around there are plenty. I use NeoBundle so i'd have to do NeoBundle 'marijnh/tern_for_vim'. If you were to use Vundle, for example, then it's Plugin 'marijnh/tern_for_vim'

@argshook

This comment has been minimized.

Copy link

@argshook argshook commented Aug 16, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment