-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E495 No autocommand file and W22 text found after endfunction #221
Comments
This is on vim 9 on mac. On vim 8.2 on ubuntu 22.04 (multipass vm on the sam mac) there is no error. vim version on mac: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 23 2023 22:12:29)
macOS version - arm64
Included patches: 1-1544
Compiled by [email protected]
Normal version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_any_white
-arabic +find_in_path +mouse_xterm -tcl
+autocmd +float +multi_byte +termguicolors
+autochdir +folding +multi_lang +terminal
-autoservername -footer -mzscheme +terminfo
-balloon_eval +fork() +netbeans_intg +termresponse
-balloon_eval_term -gettext +num64 +textobjects
-browse -hangul_input +packages +textprop
++builtin_terms +iconv +path_extra +timers
+byte_offset +insert_expand -perl +title
+channel +ipv6 +persistent_undo -toolbar
+cindent +job +popupwin +user_commands
-clientserver +jumplist +postscript -vartabs
+clipboard -keymap +printer +vertsplit
+cmdline_compl +lambda -profile +vim9script
+cmdline_hist -langmap -python +viminfo
+cmdline_info +libcall -python3 +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds -rightleft +vreplace
+cscope +localmap -ruby +wildignore
+cursorbind -lua +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con +mksession +smartindent +writebackup
+diff +modify_fname -sodium -X11
+digraphs +mouse -sound -xfontset
-dnd -mouseshape +spell -xim
-ebcdic +mouse_dec +startuptime -xpm
-emacs_tags -mouse_gpm +statusline -xsmp
+eval -mouse_jsbterm -sun_workshop -xterm_clipboard
+ex_extra +mouse_netterm +syntax -xterm_save
+extra_search +mouse_sgr +tag_binary
-farsi -mouse_sysmouse -tag_old_static
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: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa vim version on ubuntu: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 01 2023 05:37:49)
Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919
Modified by [email protected]
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_any_white
+arabic +find_in_path +mouse_xterm -tcl
+autocmd +float +multi_byte +termguicolors
+autochdir +folding +multi_lang +terminal
-autoservername -footer -mzscheme +terminfo
-balloon_eval +fork() +netbeans_intg +termresponse
+balloon_eval_term +gettext +num64 +textobjects
-browse -hangul_input +packages +textprop
++builtin_terms +iconv +path_extra +timers
+byte_offset +insert_expand -perl +title
+channel +ipv6 +persistent_undo -toolbar
+cindent +job +popupwin +user_commands
-clientserver +jumplist +postscript +vartabs
-clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +vim9script
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall +python3 +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds +rightleft +vreplace
+cscope +localmap -ruby +wildignore
+cursorbind -lua +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con +mksession +smartindent +writebackup
+diff +modify_fname +sodium -X11
+digraphs +mouse -sound -xfontset
-dnd -mouseshape +spell -xim
-ebcdic +mouse_dec +startuptime -xpm
+emacs_tags +mouse_gpm +statusline -xsmp
+eval -mouse_jsbterm -sun_workshop -xterm_clipboard
+ex_extra +mouse_netterm +syntax -xterm_save
+extra_search +mouse_sgr +tag_binary
-farsi -mouse_sysmouse -tag_old_static
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: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-aUXbZa/vim-8.2.3995=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lsodium -lacl -lattr -lgpm -L/usr/lib/python3.10/config-3.10-aarch64-linux-gnu -lpython3.10 -lcrypt -ldl -lm -lm |
Same issue. In the meantime, I've reverted to commit 7f4e4df. |
Thanks for reporting! I agree the endfunction shouldn't have a bang. PRs welcome! I'll make the change when I can if no one beats me to it :) . |
The weird part is that, i could only reproduce this error when using vim -V1 +'packadd editorconfig' We could solve the error: Error detected while processing VimEnter Autocommands for "*"..function <SNR>26_UseConfigFiles:
line 6:
E495: No autocommand file name to substitute for "<afile>" using augroup afile_amatch
autocmd!
autocmd VimEnter *
\ echom 'afile fullpath file: ' . expand('<afile>:p') |
\ echom 'afile fullpath directory: ' . expand('<afile>:p:h') |
\ echom 'amatch fullpath file: ' . expand('<amatch>:p') |
\ echom 'amatch fullpath directory: ' . expand('<amatch>:p:h')
augroup END and then open vim without a file and use The problem if we use " Only process normal buffers (do not treat help files as '.txt' files)
" When starting Vim with a directory, the buftype might not yet be set:
" Therefore, also check if buffer_name is a directory.
if index(['', 'acwrite'], &buftype) == -1 || isdirectory(l:buffer_name)
return
endif because So this condition won't be run if we use if empty(l:buffer_name)
if g:EditorConfig_enable_for_new_buf
let l:buffer_name = getcwd() . "/."
else
if g:EditorConfig_verbose
echo 'Skipping EditorConfig for unnamed buffer'
endif
return
endif
endif Btw, I'll make a PR to remove bang at |
I use editorconfig-vim installed with Plug and get some errors with the plugin:
I think this is in the code somewhere here: https://github.com/editorconfig/editorconfig-vim/blob/master/plugin/editorconfig.vim#L214 and happens if vim is opened without a file to edit given.
When giving a file this error is gone but then there is another:
I think this comes from https://github.com/editorconfig/editorconfig-vim/blob/master/autoload/editorconfig_core/ini.vim#L193
When I remove the "!", the message is gone.
I come across this problems because I use topgrade-rs to update my system and the vim update failed so I tried to find out what the problem is.
Maybe you can fix this.
Thanks in advance.
Reini
The text was updated successfully, but these errors were encountered: