Monday, April 21, 2014

Equivalent to remote_expr( funtion

Hi,

I got a problem between two command line

FIRST_ONE : call remote_expr("JOB_1", "SchedulingTask('".a:plannedHour."','".a:expr."')")
SECOND_ONE: call StartExternalTask("vim --servername ".a:servername." --remote-expr SchedulingTask('".a:plannedHour."','".a:expr."')")


My script is running well with FIRST_ONE script line but it blocks the vimscript that's why I would like to launch the same with external background in order to liberate my vim session.

Can you help me to see the difference please ?
_____________

"{{{ StartExternalTask()
function! s:StartExternalTask(task)
exe "!start cmd /c \"".a:task."\""
endfunc
"}}}
" Handlers part done by server feature
"{{{ HandlerTask()
function! s:HandlerTask(servername)
call s:StartExternalTask("vim --servername ".a:servername)
endfunc
"}}}
" Orders come from client feature
"{{{ JobOrder()
function! s:JobOrder(servername,plannedHour,expr)
" launch server well named if does not exist
if !IsServerNameExists(a:servername)
call s:HandlerTask(a:servername)
sleep 400m
endif
call remote_expr("JOB_1", "SchedulingTask('".a:plannedHour."','".a:expr."')")
call StartExternalTask("vim --servername ".a:servername." --remote-expr SchedulingTask('".a:plannedHour."','".a:expr."')")
endfunc
"}}}

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: