Hi, I'm configuring a variable called $CLASSPATH in order to have javacomplete 
plugin running well.
I'm using a software called "maven" to build the project and I have found that 
executing this command:
   mvn dependency:build-classpath | grep -v "^\["
gives me exactly the classpath it use to compile the project... so using this 
to generate $CLASSPATH seems to be the better way.

To assign that output to $CLASSPATH using <Leader>cp, I have done:
function! ReadMvnClasspath()
  let $CLASSPATH=system('echo \"`mvn dependency:build-classpath | grep -v 
"^\["`\"')
endfunction
au BufRead,BufNew *.java nmap <Leader>cp :call ReadMvnClasspath()<CR>

and this run well.
The question is: can you explaing why if I try to avoid the function with next 
command, I obtain an error at startup?
au BufRead,BufNew *.java nmap <Leader>cp :let $CLASSPATH=system('echo \"`mvn 
dependency:build-classpath | grep -v "^\["`\"')

Doing this I obtain at startup:
:!grep -n -v "^\["`\"') /dev/null 2>&1| tee /tmp/<afile>
/bin/bash: -c line 0: unexpected EOF while looking for matching ``'

Thanks
Bye
  R

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to