Ecco una sintesi dei vari metodi che ha lavorato per me in linux vim7.4 e Syntastic3.7.0-224 con credito per ogni.
Metodo 1 - creazione manuale di .syntastic_javac_config
1. Edit .vimrc and use this syntax:
let g:syntastic_java_javac_config_file_enabled = 1
2. Where you edit your vim files, add this to a file named .syntastic_javac_config
let g:syntastic_java_javac_classpath = '/home/davis/progs/princeton-algos/week1/libs/algs4.jar'
Metodo 2 - vantaggio, non importa dove si modifica il percorso di classe è noto.
1. Edit .vimrc and use this syntax:
let g:syntastic_java_javac_classpath = "/home/davis/progs/princeton-algos/week1/libs/algs4.jar"
Questo aggiunge il vaso e
Metodo 3 - Generazione automatica di file di .syntastic_javac_config
1. Edit .vimrc and use this syntax:
let g:syntastic_java_javac_config_file_enabled = 1
2. Edit a java file with vim
3. :SyntasticJavacEditClasspath
When the edit window opens, add the class path without quotes and a newline after each entry the class path. In my case, this is the entry
for the setting includes the current folder as well:
/home/davis/progs/princeton-algos/week1/libs/algs4.jar
.
4 :wq the edit setting window
5. Now the class path is set for syntastic when editing files from that location. If you edit from a new directory, you will need to repeat the process.
Oltre alle osservazioni di cui sopra, questo post anche aiutato.
Syntastic funge solo da intermediario tra Vim e molti programmi esterni. Dovresti 1. scoprire quale programma è usato per controllare il tuo codice, 2. cercare nel suo documento un modo per renderlo più intelligente, 3. vedi se riesci a configurare Syntastic. – romainl
Probabilmente javac si confonde perché lo stai eseguendo dalla directory sbagliata. – FDinoff
Grazie. Lo sto usando in combinazione con You Complete Me (YCM). – lorean