다음 vim 함수를 사용하여 Windows에서 sas를 실행하려고하지만 시스템에 대한 인수가 유효하지 않습니다라는 오류 메시지가 항상 나타납니다.vim 함수 시스템의 잘못된 인수
일부 전문가는 나를 도울 수 있습니까?
C :
MYY의 SAS가 설치되어 \ 프로그램 파일 \ SAS \ SAS \ 9.1 \ sas.exe
function! RunSASonCurrentFile()
" Make sure this is a SAS program file (ends with .sas) so that
" we don't run SAS on a log file or similar.
:let checkSASpgm=match(expand("%"),"\.sas")
" If we did not match .sas in the file name, end this function with
" a warning msg
if checkSASpgm==-1
:echo "*** Current file is not a SAS program. SAS run has been canceled."
:return
endif
" Ask user if we want to run SAS so we don't accidentally run it.
:let l:answer = input("Run SAS? Y/N ")
:if (l:answer == "Y" || l:answer == "y")
" If file has been modified, save it before running
if exists(&modified)
:echo "*** Saving modified file before SAS run..."
:w
endif
" Run SAS on path/file name (modify to your location of sas)
:echo "*** Running SAS..."
"let returntxt = system("/usr/local/bin/sas -nodms " . shellescape(expand("%:p")))
" The following may work for your Windows system. Comment the line above and uncomment
" the two lines below and make them one long line.
let returntxt = system("\"" . shellescape("C:\\Program\ Files\\SAS\\SAS\9.1\\sas.exe")
". "\ -nosplash" . "\ -sysin" . "\ " . shellescape(expand("%:p")) . "\"")
" Shows the return messages from the SAS commandline (may be useful
" if no log produced)
:echo "*** SAS commandline: " . returntxt
:call LoadSASLogList()
:else
:echo "SAS Run cancelled."
" endif for the Run SAS? check
:endif
endfunction
나는 그것을 바로 잡으려고했다. 작동하지 않습니다. 대답 해줘서 고마워. – john
시스템 (....)에 잘못된 argagument가 표시됩니다. 나는 잘못된 문자열을 통과 할까 봐 걱정합니다. – john