I have tried new way of autoload and for me it didn't work (windows 8.2.4050)
I have autoload/comment.vim: vim9script autoload # Toggle comments # Usage: # 1. Save in ~/.vim/autoload/comment.vim # 2. Add following mappings to vimrc: # import autoload 'comment.vim' # nnoremap <silent> <expr> gc comment.Toggle() # xnoremap <silent> <expr> gc comment.Toggle() # nnoremap <silent> <expr> gcc comment.Toggle() .. '_' export def Toggle(...args: list<string>): string ... And in my ~/vimfiles/vimrc: import autoload 'comment.vim' nnoremap <silent> <expr> gc comment.Toggle() xnoremap <silent> <expr> gc comment.Toggle() nnoremap <silent> <expr> gcc comment.Toggle() .. '_' # nnoremap <silent> <expr> gc comment#toggle() # xnoremap <silent> <expr> gc comment#toggle() # nnoremap <silent> <expr> gcc comment#toggle() .. '_' After pressing gcc I get error: E121: Undefined variable: comment [image: 2022-01-10_10-17-06.png] -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/d211cce6-38c2-49fa-8458-2f7b2a513c35n%40googlegroups.com.