junegunn / vim-plug

:hibiscus: Minimalist Vim Plugin Manager
https://junegunn.github.io/vim-plug/
MIT License
33.89k stars 1.9k forks source link

Error detected while processing on macOS #1220

Closed florianldt closed 1 year ago

florianldt commented 1 year ago

I am trying to use vim-plug on macOS, after installing vim-plug as specified in the README and running :PlugInstall with success, I am getting the following errors while doing so %:

KakaoTalk_Photo_2022-10-29-00-30-36
Error detected while processing /Users/florian/.vimrc[6]..function plug#end[89]..<SNR>14_reload_plugins[2]..<SNR>14_load_plugin[1]..<SNR>14_source[4]..script /Users/florian/.vim/plugged/vim-easy-align/plugin/easy_align.vim:
line   23:
E492: Not an editor command: ^M
line   24:
E488: Trailing characters: ^M
line  143:
E171: Missing :endif

Thank you


" vim-plug
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
Plug 'junegunn/vim-easy-align'
" Initialize plugin system
call plug#end()
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 19 2022 18:24:48)
macOS version - arm64
Included patches: 1-800
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +cmdline_hist      +ex_extra          +jumplist          +mouse_dec         +perl              -sodium            +textobjects       +wildmenu
+arabic            +cmdline_info      +extra_search      +keymap            -mouse_gpm         +persistent_undo   -sound             +textprop          +windows
+autocmd           +comments          -farsi             +lambda            -mouse_jsbterm     +popupwin          +spell             +timers            +writebackup
+autochdir         +conceal           +file_in_path      +langmap           +mouse_netterm     +postscript        +startuptime       +title             -X11
-autoservername    +cryptv            +find_in_path      +libcall           +mouse_sgr         +printer           +statusline        -toolbar           -xfontset
-balloon_eval      +cscope            +float             +linebreak         -mouse_sysmouse    +profile           -sun_workshop      +user_commands     -xim
+balloon_eval_term +cursorbind        +folding           +lispindent        +mouse_urxvt       -python            +syntax            +vartabs           -xpm
-browse            +cursorshape       -footer            +listcmds          +mouse_xterm       +python3           +tag_binary        +vertsplit         -xsmp
++builtin_terms    +dialog_con        +fork()            +localmap          +multi_byte        +quickfix          -tag_old_static    +vim9script        -xterm_clipboard
+byte_offset       +diff              +gettext           +lua               +multi_lang        +reltime           -tag_any_white     +viminfo           -xterm_save
+channel           +digraphs          -hangul_input      +menu              -mzscheme          +rightleft         -tcl               +virtualedit
+cindent           -dnd               +iconv             +mksession         +netbeans_intg     +ruby              +termguicolors     +visual
-clientserver      -ebcdic            +insert_expand     +modify_fname      +num64             +scrollbind        +terminal          +visualextra
+clipboard         +emacs_tags        +ipv6              +mouse             +packages          +signs             +terminfo          +vreplace
+cmdline_compl     +eval              +job               -mouseshape        +path_extra        +smartindent       +termresponse      +wildignore
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/opt/homebrew/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector-strong -L/opt/homebrew/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/opt/readline/lib -o vim -
lm -lncurses -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lua/lib -llua5.4 -mmacosx-version-min=12.6 -fstack-protector-strong -L/opt/homebrew/opt/perl/lib/perl5/5.36
/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -framework C
oreFoundation -lruby.3.1 -L/opt/homebrew/Cellar/ruby/3.1.2_1/lib
serin9811 commented 1 year ago

I solved this problem. I tried many things so I don't know exactly what it made work but I tried below.

After this I removed plugged items under ~/.vim/autoload/ and ~/.vim/plugged/ and reinstall Plugs and it worked.

junegunn commented 1 year ago

Do you have any global git configurations that might mess up the line endings?

git config --global --list | grep core
serin9811 commented 1 year ago

@junegunn yes, I had git global config core.autocrlf false