Windows에서 "Copen"명령 오류
6102 단어 vim-dispatch
묘사
샘플 scss 코드:$blue: #3bbfce;
$margin: 16px;
.content_navigation {
border-color: $blue;
color: darken($blue, 10%);
}
.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $blue;
color: red;
// Yes, missing bracket
vim에서 Dispatch 및 Copen 명령을 실행하면 다음 오류 메시지가 표시됩니다.Error detected while processing function dispatch#copen[8]..<SNR>34_cgetfile:
line19:
E40: Can't open errorfile C:/Users/Think/AppData/Local/Temp/VIC5B3E.tmp
다음은 문제를 재현할 수 있는 미니vim 설정입니다." Windows {
if has('win32') || has('win64')
" Use forward slash as path separator
set shellslash
" On Windows, also use '.vim' instead of 'vimfiles'; this makes synchronization across systems easier
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$HOME/.vim/after,$VIM/vimfiles/after
endif
" }
set nocompatible
filetype off
call plug#begin($HOME . '/.vim/bundle')
" Plugins {
Plug 'tpope/vim-dispatch'
" Add plugins to &runtimepath
call plug#end()
filetype plugin indent on
" vim-dispatch {
augroup Dispatch
autocmd!
autocmd FileType sass,scss let b:dispatch = 'sass --style expanded % > %:r.css && css-beautify -r -f %:r.css -s 2 -w 78'
augroup END
" }
이것은 저의vim버전 정보입니다.VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 26 2016 17:27:24)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-1848
Compiled by veegee@VEEGEE-WIN10
Huge version with GUI. Features included (+) or not (-):
+acl +eval +mouseshape +tag_old_static
+arabic +ex_extra +multi_byte -tag_any_white
+autocmd +extra_search +multi_lang -tcl
+balloon_eval +farsi -mzscheme -termguicolors
+browse +file_in_path +netbeans_intg -tgetent
++builtin_terms +find_in_path +ole -termresponse
+byte_offset +float +packages +textobjects
+channel +folding +path_extra +timers
+cindent -footer -perl +title
+clientserver +gettext/dyn +persistent_undo +toolbar
+clipboard -hangul_input -postscript +user_commands
+cmdline_compl +iconv/dyn +printer +vertsplit
+cmdline_hist +insert_expand +profile +virtualedit
+cmdline_info +job +python/dyn +visual
+comments +jumplist +python3/dyn +visualextra
+conceal +keymap +quickfix +viminfo
+cryptv +langmap +reltime +vreplace
+cscope +libcall +rightleft +wildignore
+cursorbind +linebreak +ruby/dyn +wildmenu
+cursorshape +lispindent +scrollbind +windows
+dialog_con_gui +listcmds +signs +writebackup
+diff +localmap +smartindent -xfontset
+digraphs +lua/dyn +startuptime -xim
+directx +menu +statusline -xterm_save
-dnd +mksession -sun_workshop -xpm_w32
-ebcdic +modify_fname +syntax
+emacs_tags +mouse +tag_binary
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE
-DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DWINVER=0x0501 -D_WIN32_WINNT=0x0501
/Fo.\ObjGXOUYHRAMD64/ /Ox /GL -DNDEBUG /Zl /MT -DFEAT_OLE -DFEAT_GUI_W32
-DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_LUA
-DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON
-DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3
-DDYNAMIC_PYTHON3_DLL=\"python35.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY
-DDYNAMIC_RUBY_VER=230 -DDYNAMIC_RUBY_DLL=\"x64-msvcr120-ruby230.dll\" -DFEAT_HUGE
/Fd.\ObjGXOUYHRAMD64/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib
advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib
winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:AMD64 /nodefaultlib libcmt.lib oleaut32.lib
user32.lib /nodefaultlib:lua53.lib /nodefaultlib:python27.lib /nodefaultlib:python35.lib WSock32.lib
/PDB:gvim.pdb -debug
토론 #1
파일 "VIC5B3E"'tmp' 가 생성되지 않았습니다.그러나 "VIC5B3E.tmp.및 VIC5B3E를 완료합니다.tmp.'pid'가 성공적으로 생성되었습니다.토론 #2
Can't open errorfile
는 일반적으로 박리 실패가 심각하고 출력을 파일로 바꿀 수 없다는 것을 의미한다.케이스 설정을 확인하세요.cmd.exe
쓰고 있어요?토론 #셋
네, cmd를 사용하고 있습니다.Windows 10에서 실행되므로 설정을 변경한 적이 없습니다.실제로 Dispatch 명령에 컴파일 오류가 있는 경우에만 오류가 발생합니다.미안합니다. 이것은 제 잘못입니다(
실제로vim dispatch에서는 tmp 파일을 생성하기 위해 다음 명령을 호출합니다.
sass --style expanded test.scss > test.css && css-beautify -r -f test.css -s 2 -w 78 > C:/Users/Think/AppData/Local/Temp/VIC5B3E.tmp 2>&1
그러나sass의 컴파일 결과는 tmp 파일로 바뀌지 않습니다. 왜냐하면 '>' 의 우선순위가 '& &' 보다 높기 때문입니다.명령 주위에 문제를 해결하기 위해 괄호를 추가하다.
autocmd FileType sass,scss let b:dispatch = '(sass --style expanded % > %:r.css && css-beautify -r -f %:r.css -s 2 -w 78)'
Reference
이 문제에 관하여(Windows에서 "Copen"명령 오류), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://github.com/tpope/vim-dispatch/issues/183텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)