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

Can this plugin run functions defined in .vimrc execute asynchronously? #43

Closed
ghost opened this issue Mar 9, 2017 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented Mar 9, 2017

For example, I have this function:

func! CompileCppAndRun()
"silent w
"silent make
execute "copen"
if (line('$') == 1 && getline(1) == '')
silent execute ":cclose"
let cexec = "". "%:p:r "
silent execute "!clear"
silent execute "!" . "xterm " . "-e " . "cb_console_runner " . cexec
endif

endfunc

This is a function that compiles c++ program, executes if compiled or opens quickfix if there are compile errors.

So, can AsyncRun call this function?

@skywind3000
Copy link
Owner

No, job_start in vim can only run external process.
You can implement it in a .sh script and launch it by AsyncRun.

@ghost
Copy link
Author

ghost commented Mar 10, 2017

Oh, thank you. Well, I think I can close the issue.

@ghost ghost closed this as completed Mar 10, 2017
This issue was closed.
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

1 participant