ternjs / tern_for_vim

Tern plugin for Vim
MIT License
1.83k stars 100 forks source link

help to install #90

Closed xavierartot closed 6 years ago

xavierartot commented 9 years ago

Hi, Someone can help me with that? vimrc " autocompletion by langage: set omnifunc=syntaxcomplete#Complete let g:tern_map_keys=1 let g:tern_show_argument_hints="on_hold"

In my home repertorie .tern-preject { "libs": [ "browser", "jquery" ], "loadEagerly": [ "importantfile.js" ], "plugins": { "requirejs": { "baseURL": "./", "paths": {} } } }

stobenski commented 9 years ago

You need to have installed ternjs (sudo npm install -g tern) and do npm install once in tern_for_vim plugin directory (~/.vim/*/tern_for_vim/).

In your ~/.vimrc you must have for tern configuration only (if you want 'on hold'):

let g:tern_show_argument_hints="on_hold"

because plugin sets omnifunc= in javascript files automatically (omnifunc=tern#Complete) .

If you want to have global tern configuration, file name must be: ~/.tern-config, if project only: .tern-project.

Also, for automatic completion menu popup I recommend neocomplete.

xavierartot commented 9 years ago

I did re-install the package, but still weird. When I typing I have a new spilt window on the top and inside the function definition below.

fn(pattern: string) -> [string] Splits a String object into an array of strings by separating the string into substrings.

I just don't understand how do it work too?

Which I do install neocomplete or Tern?

Thank you