Dockerfiles로 놀고 있었고 개발 환경을 설정할 때 아직 해결하지 못한 수동 단계가 하나 있습니다. vimrc에 번들을 설치하려면 vim을 열어야합니다. 그러면 vim을 모두 다운로드 한 후 계속하려면 enter를 누르라고 말합니다. Dockerfile에서 RUN 명령 으로이 단계를 수행하고 싶습니다. vim이 열릴 때 vim -c 'q'
명령을 실행하는을 사용하려고 시도 :q
했지만 자동 번들 설치 스크립트는 여전히 enter 키를 눌러야하며 vim은 입력 및 출력이 터미널이 아니라고 불평하므로 작동하지 않습니다.
이미지가 아닌 Dockerfiles 로이 작업을 수행하고 싶습니다.
여기 내 관련 .vimrc 섹션이 있습니다.
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
let iCanHazVundle=0
endif
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
call GetBundles()
if iCanHazVundle == 0
echo "Installing Bundles, please ignore key map error messages"
echo ""
silent :BundleInstall
endif
" Setting up Vundle - the vim plugin bundler end
답변
내 플러그인을 별도의 파일에 나열 하여이 문제를보다 쉽게 해결할 수 있음을 알았습니다 vundle.vim
. 이렇게하면 Ex 모드.vimrc
에서 잘 재생되지 않는 플러그인 및 설정을 피할 수 있습니다 .
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Add plugins
Plugin 'bling/vim-airline'
" ...
그런 다음 아래와 같이 ex 모드로 설치를 실행할 수 있습니다.
vim -E -u NONE -S ~/.vim/vundle.vim +PluginInstall +qall > /dev/null