Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Vim error msg when opening .ini file

19 views
Skip to first unread message

rj

unread,
Aug 17, 2023, 12:00:42 PM8/17/23
to
Vim shows the following long error message when I
open a file that has a dot-ini (.ini) file extension:


Error detected while processing
/usr/share/vim/vimrc[25]../usr/share/vim/vim90/syntax/syntax.vim[44]..BufRead
Autocommands for "*~"..BufRead Autocommands for "*.ini"..FileType
Autocommands for "*"..Syntax Autocommands for "*"..function
<SNR>3_SynSet[25]..script /usr/share/vim/vim90/syntax/dosini.vim: line 28:
E10: \ should be followed by /, ? or &


Implementing that suggestion at the end of the message had no effect. (Or,
rather, it made the error message even longer and more incrutable.)


--> vim --version VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 15 2023
20:47:29) Included patches: 1-1713 Modified by team...@tracker.debian.org
Compiled by team...@tracker.debian.org 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-9Zy3tT/vim-9.0.0749+really.v9.0.1713=.
-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-x86_64-linux-gnu -lpython3.10 -lcrypt
-ldl -lm -lm```


:set runtimepath? shows:

runtimepath=~/.vim,/var/lib/vim/addons,/etc/vim,/usr/share/vim/vimfiles,
/usr/share/vim/vim90/,/usr/share/vim/vimfiles/after,/etc/vim/after,
/var/lib/vim/addons/after,~/.vim/after


I have vim-plug, the vim plugin manager, in ~/.vim/autoload/plug.vim but no
plugins currently installed,


How can I get Vim to open .ini files without showing error message(s)?

Thank you for reading.


rj

unread,
Aug 17, 2023, 12:19:58 PM8/17/23
to
Vim shows the following long error message when I
open a file that has a dot-ini (.ini) file extension:


Error detected while processing
/usr/share/vim/vimrc[25]../usr/share/vim/vim90/syntax/syntax.vim[44]..BufRead
Autocommands for "*~"..BufRead Autocommands for "*.ini"..FileType
Autocommands for "*"..Syntax Autocommands for "*"..function
<SNR>3_SynSet[25]..script /usr/share/vim/vim90/syntax/dosini.vim: line 28:
E10: \ should be followed by /, ? or &


Implementing that suggestion at the end of the message had no effect. (Or
rather it made the error message even longer and more inscrutable.)

rj

unread,
Aug 17, 2023, 12:21:46 PM8/17/23
to
Vim shows the following long error message when I
open a file that has a dot-ini (.ini) file extension:


Error detected while processing
/usr/share/vim/vimrc[25]../usr/share/vim/vim90/syntax/syntax.vim[44]..BufRead
Autocommands for "*~"..BufRead Autocommands for "*.ini"..FileType
Autocommands for "*"..Syntax Autocommands for "*"..function
<SNR>3_SynSet[25]..script /usr/share/vim/vim90/syntax/dosini.vim: line 28:
E10: \ should be followed by /, ? or &


Implementing that suggestion at the end of the message had no effect. (Or,
rather, it made the error message even longer and more incrutable.)

haron

unread,
Aug 18, 2023, 4:50:50 PM8/18/23
to
Strange. Neither of syntax/dosini.vim files in vim-runtime debian packages - buster, bullseye, bookworm, trixie, sid - contain '\' character in the line 28. This appear in the recent git versions of that file but should not reach debian packages yet ? (Yet may be I do not understand as well update mechanisms of debian. Anyway, with recent git version of that file I cannot reproduce reported problem - opensuse user here). If you can share the content of that file: /usr/share/vim/vim90/syntax/dosini.vim, may be that will lead to something... Another advice - post the question in vim_use google group, that would expose your question to much wider selection of experts probably.

With best regards, Anton

rj

unread,
Aug 19, 2023, 7:04:21 PM8/19/23
to
On Fri, 18 Aug 2023 13:50:48 -0700 (PDT),
haron <anton.s...@gmail.com> wrote:

> If you can share the content of that file:
> /usr/share/vim/vim90/syntax/dosini.vim,
> may be that will lead to something.

------------------------------------------------------------
1 " Vim syntax file
2 " Language: Configuration File (ini file) for MSDOS/MS Windows
3 " Version: 2.3
4 " Original Author: Sean M. McKee <mc...@misslink.net>
5 " Previous Maintainer: Nima Talebi <ni...@it.net.au>
6 " Current Maintainer: Hong Xu <ho...@topbug.net>
7 " Homepage: http://www.vim.org/scripts/script.php?script_id=3747
8 " Repository: https://github.com/xuhdev/syntax-dosini.vim
9 " Last Change: 2023 Jun 27
10
11
12 " quit when a syntax file was already loaded
13 if exists("b:current_syntax")
14 finish
15 endif
16
17 " shut case off
18 syn case ignore
19
20 syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue
21 syn match dosiniValue "=\zs.*"
22 syn match dosiniNumber "=\zs\s*\d\+\s*$"
23 syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
24 syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
25 syn region dosiniHeader start="^\s*\[" end="\]"
26 syn match dosiniComment "^[#;].*$"
27 syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold
28 \ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment
29
30 " Define the default highlighting.
31 " Only when an item doesn't have highlighting yet
32
33 hi def link dosiniNumber Number
34 hi def link dosiniHeader Special
35 hi def link dosiniComment Comment
36 hi def link dosiniLabel Type
37 hi def link dosiniValue String
38
39
40 let b:current_syntax = "dosini"
41
42 " vim: sts=2 sw=2 et
------------------------------------------------------------

Another advice - post the question in
vim_use google group,

Done.

rj

unread,
Aug 20, 2023, 2:12:25 PM8/20/23
to
On Sat, 19 Aug 2023 19:04:12 -0400, rj <r...@panix.com.invalid> wrote:
> On Fri, 18 Aug 2023 13:50:48 -0700 (PDT),
> haron <anton.s...@gmail.com> wrote:
>
>> If you can share the content of that file:
>> /usr/share/vim/vim90/syntax/dosini.vim,
>> may be that will lead to something.


This problem has been solved by replacing the
/usr/share/vim/vim90/syntax/dosini.vim
file dated *2023 Jun 27* with the one dated *2023 Aug 20*
posted by Christian Brabandt here:
<https://groups.google.com/g/vim_use/c/9zccgo_RIqM>

Thanks, Christian.
0 new messages