Configuration file does not support #

56 views
Skip to first unread message

李坏之

unread,
Jun 27, 2024, 11:51:20 AMJun 27
to vim_use
Why does an error occur when changing the comment of the vim9.1 configuration file to #? 9.1 does not support #

Lifepillar

unread,
Jun 27, 2024, 4:47:09 PMJun 27
to vim...@googlegroups.com
On 2024-06-27, 李坏之 <ogou...@gmail.com> wrote:
> Why does an error occur when changing the comment of the vim9.1
> configuration file to #? 9.1 does not support #

Not sure I understand your question, but before `vim9script` you should
use the legacy comment symbol " (double quote). For example:

" vim: set sw=2 ts=2 sts=0 et fdm=marker :nospell:
" Here, legacy comments must be used
" In general, before `vim9script`, legacy syntax is assumed

if !has('vim9script')
" Still legacy Vim script syntax
echomsg 'Vim 9 script is not available')
finish
endif

vim9script

# Now, Vim 9 script syntax is assumed
# The comment delimiter must be #

Hope this helps,
Life.


Reply all
Reply to author
Forward
0 new messages