Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lein classpath should be run with ! not system() #4

Open
tomtom opened this issue Jul 24, 2013 · 2 comments
Open

lein classpath should be run with ! not system() #4

tomtom opened this issue Jul 24, 2013 · 2 comments

Comments

@tomtom
Copy link

tomtom commented Jul 24, 2013

I'm having problems to get vim-classpath to work with GVIM @ Ubuntu 12.04. This can be easily fixed with this diff:

index f578405..8749612 100644
--- a/autoload/classpath.vim
+++ b/autoload/classpath.vim
@@ -123,7 +123,9 @@ function! classpath#detect(...) abort
       let dir = getcwd()
       try
         execute cd . fnameescape(root)
-        let out = system(cmd)
+        redir => out
+        exec 'silent !' cmd
+        redir END
       finally
         execute cd . fnameescape(dir)
       endtry`

There are some differences in how shell commands are run which precludes lein classpath to return something useful. IIRC this also depends on the OS and the version of (G)VIM one uses. I cannot currently remember the details though.

@tpope
Copy link
Owner

tpope commented Jul 29, 2013

Reeeeally hesitant to make this switch, at least not without harder evidence. I've had hard-to-reproduce problems in the past where using ! caused weird redraw issues that vanished with system().

Works fine for me on 13.04, FWIW.

@tomtom
Copy link
Author

tomtom commented Jul 29, 2013

Could you please at least make it user configurable via some user customizable variable/parameter? Thanks.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants