E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

Peng Yu
I got the following error when I run vim on an ubunut docker image. Does anybody know know what is wrong with the vim installation? Thanks.

$ vi
Error detected while processing /root/.vimrc:
line  401:
E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
Press ENTER or type command to continue
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
Included patches: 1-1453
Modified by [hidden email]
Compiled by [hidden email]
Huge version without GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               -perl              +vertsplit
-clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           -python            +vreplace
+conceal           +linebreak         +python3           +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       -lua               -ruby              -X11
+dialog_con        +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             -xim
+digraphs          +modify_fname      +smartindent       -xpm
-dnd               +mouse             +startuptime       -xsmp
-ebcdic            -mouseshape        +statusline        -xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              +mouse_gpm         +syntax            
+ex_extra          -mouse_jsbterm     +tag_binary        
+extra_search      +mouse_netterm     +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 -fdebug-prefix-map=/build/vim-NQEcoP/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl     -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm      

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

Dominique Pellé
PM Peng Yu <[hidden email]> wrote:

> I got the following error when I run vim on an ubunut docker image. Does anybody know know what is wrong with the vim installation? Thanks.
>
> $ vi
> Error detected while processing /root/.vimrc:
> line  401:
> E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> Press ENTER or type command to continue
> $ vim --version
> VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
> Included patches: 1-1453
> Modified by [hidden email]
> Compiled by [hidden email]
> Huge version without GUI.  Features included (+) or not (-):

You ran 'vi' instead of 'vim'. I'm guessing that 'vi' is not
the same as 'vim' on your machine. vi is probably
vim.tiny without multi-byte. Can you try:

  $ type vi
  $ vi --version

Dominique

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

Peng Yu
>   $ type vi
>   $ vi --version

They are the same.

$ diff <(vi --version ) <(vim --version )

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

Peng Yu
In reply to this post by Peng Yu
> I got the following error when I run vim on an ubuntu docker image. Does anybody know what is wrong with the vim installation? Thanks.

Here (scroll toward the end) is the difference between the vim
--version on my mac os (works) and the docker (does not work). I guess
that the problem must be caused by one of the switches. Does anybody
see which switch causes the problem? Thanks.

https://asciinema.org/a/7wfeSOeIiwEuk8TSbvZgdLXga

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

Christian Brabandt

On Fr, 11 Jan 2019, Peng Yu wrote:

> > I got the following error when I run vim on an ubuntu docker image. Does anybody know what is wrong with the vim installation? Thanks.
>
> Here (scroll toward the end) is the difference between the vim
> --version on my mac os (works) and the docker (does not work). I guess
> that the problem must be caused by one of the switches. Does anybody
> see which switch causes the problem? Thanks.
>
> https://asciinema.org/a/7wfeSOeIiwEuk8TSbvZgdLXga

Instead of recording a screen session and showing a diff that is hardly
readable, because I cannot even guess what part of the output belongs to
which vim version. So please simply show the output of `vim --version`
of your docker image.

Best,
Christian
--
Alles, was die Menschen in Bewegung setzt, muß durch ihren Kopf
hindurch, aber welche Gestalt es in diesem Kopf annimmt, hängt von den
Umständen ab.
                -- Friedrich Engels

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

Peng Yu
It is already shown in the original email. I guess you mean vim on macos?

Here is it.

$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 13 2018 08:58:43)
macOS version
Included patches: 1-577
Compiled by [hidden email]
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
+autochdir         +float             +mouse_xterm       +terminal
-autoservername    +folding           +multi_byte        +terminfo
+balloon_eval      -footer            +multi_lang        +termresponse
+balloon_eval_term +fork()            -mzscheme          +textobjects
+browse            +fullscreen        +netbeans_intg     +timers
++builtin_terms    -gettext           +num64             +title
+byte_offset       -hangul_input      +odbeditor         +toolbar
+channel           +iconv             +packages          +transparency
+cindent           +insert_expand     +path_extra        +user_commands
+clientserver      +job               +perl/dyn          +vartabs
+clipboard         +jumplist          +persistent_undo   +vertsplit
+cmdline_compl     +keymap            +postscript        +virtualedit
+cmdline_hist      +lambda            +printer           +visual
+cmdline_info      +langmap           +profile           +visualextra
+comments          +libcall           +python/dyn        +viminfo
+conceal           +linebreak         +python3/dyn       +vreplace
+cryptv            +lispindent        +quickfix          +wildignore
+cscope            +listcmds          +reltime           +wildmenu
+cursorbind        +localmap          +rightleft         +windows
+cursorshape       +lua/dyn           +ruby/dyn          +writebackup
+dialog_con_gui    +menu              +scrollbind        -X11
+diff              +mksession         +signs             -xfontset
+digraphs          +modify_fname      +smartindent       +xim
+dnd               +mouse             +startuptime       -xpm
-ebcdic            +mouseshape        +statusline        -xsmp
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_clipboard
+eval              -mouse_gpm         +syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary
+extra_search      +mouse_netterm     +tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM
-Wall -Wno-unknown-pragmas -pipe  -DMACOS_X -DMACOS_X_DARWIN  -g -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector -L/usr/local/lib
-L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib
-L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib
-L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib
-L/usr/local/opt/readline/lib  -L/usr/local/lib -o Vim -framework
Cocoa -framework Carbon       -lm  -lncurses -liconv -framework AppKit
  -fstack-protector
-L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE


On Sat, Jan 12, 2019 at 5:13 AM Christian Brabandt <[hidden email]> wrote:

>
>
> On Fr, 11 Jan 2019, Peng Yu wrote:
>
> > > I got the following error when I run vim on an ubuntu docker image. Does anybody know what is wrong with the vim installation? Thanks.
> >
> > Here (scroll toward the end) is the difference between the vim
> > --version on my mac os (works) and the docker (does not work). I guess
> > that the problem must be caused by one of the switches. Does anybody
> > see which switch causes the problem? Thanks.
> >
> > https://asciinema.org/a/7wfeSOeIiwEuk8TSbvZgdLXga
>
> Instead of recording a screen session and showing a diff that is hardly
> readable, because I cannot even guess what part of the output belongs to
> which vim version. So please simply show the output of `vim --version`
> of your docker image.
>
> Best,
> Christian
> --
> Alles, was die Menschen in Bewegung setzt, muß durch ihren Kopf
> hindurch, aber welche Gestalt es in diesem Kopf annimmt, hängt von den
> Umständen ab.
>                 -- Friedrich Engels
>
> --
> --
> You received this message from the "vim_use" 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 a topic in the Google Groups "vim_use" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/YyON64D7Zec/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.



--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Bram Moolenaar
In reply to this post by Peng Yu
> I got the following error when I run vim on an ubunut docker image.
> Does anybody know know what is wrong with the vim installation?
> Thanks.
>
> $ vi
> Error detected while processing /root/.vimrc:
> line  401:
> E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> Press ENTER or type command to continue

Looks like the two characters after tab: were corrupted.
Perhaps caused by conversion between encodings.


--
"Hit any key to continue" it said, but nothing happened after F sharp.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Peng Yu
On Sat, Jan 12, 2019 at 7:57 AM Bram Moolenaar <[hidden email]> wrote:

>
> > I got the following error when I run vim on an ubunut docker image.
> > Does anybody know know what is wrong with the vim installation?
> > Thanks.
> >
> > $ vi
> > Error detected while processing /root/.vimrc:
> > line  401:
> > E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> > Press ENTER or type command to continue
>
> Looks like the two characters after tab: were corrupted.
> Perhaps caused by conversion between encodings.

The files are exactly the same on both systems. So the difference
should be in vim. What vim compile options affect the encodings?

ttys009@10:00:55@~$ grep listchars ~/.vimrc |xxd
00000000: 7365 7420 6c69 7374 6368 6172 733d 7461  set listchars=ta
00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a    b:...\ ,eol:...
ttys009@10:01:06@~$ uname
Darwin

19a9967ba259:pts@16:01:37@~$ grep listchars ~/.vimrc |xxd
00000000: 7365 7420 6c69 7374 6368 6172 733d 7461  set listchars=ta
00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a    b:...\ ,eol:...
19a9967ba259:pts@16:01:43@~$ uname
Linux

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Peng Yu
On Sat, Jan 12, 2019 at 10:04 AM Peng Yu <[hidden email]> wrote:

>
> On Sat, Jan 12, 2019 at 7:57 AM Bram Moolenaar <[hidden email]> wrote:
> >
> > > I got the following error when I run vim on an ubunut docker image.
> > > Does anybody know know what is wrong with the vim installation?
> > > Thanks.
> > >
> > > $ vi
> > > Error detected while processing /root/.vimrc:
> > > line  401:
> > > E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> > > Press ENTER or type command to continue
> >
> > Looks like the two characters after tab: were corrupted.
> > Perhaps caused by conversion between encodings.
>
> The files are exactly the same on both systems. So the difference
> should be in vim. What vim compile options affect the encodings?
>
> ttys009@10:00:55@~$ grep listchars ~/.vimrc |xxd
> 00000000: 7365 7420 6c69 7374 6368 6172 733d 7461  set listchars=ta
> 00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a    b:...\ ,eol:...
> ttys009@10:01:06@~$ uname
> Darwin
>
> 19a9967ba259:pts@16:01:37@~$ grep listchars ~/.vimrc |xxd
> 00000000: 7365 7420 6c69 7374 6368 6172 733d 7461  set listchars=ta
> 00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a    b:...\ ,eol:...
> 19a9967ba259:pts@16:01:43@~$ uname
> Linux

It seems that the vim on ubuntu does not recognize the following
triangle character. Any reason why it is so?

- ▸

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Gary Johnson-4
On 2019-01-12, Peng Yu wrote:

> On Sat, Jan 12, 2019 at 10:04 AM Peng Yu wrote:
> >
> > On Sat, Jan 12, 2019 at 7:57 AM Bram Moolenaar wrote:
> > >
> > > > I got the following error when I run vim on an ubunut docker image.
> > > > Does anybody know know what is wrong with the vim installation?
> > > > Thanks.
> > > >
> > > > $ vi
> > > > Error detected while processing /root/.vimrc:
> > > > line  401:
> > > > E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> > > > Press ENTER or type command to continue
> > >
> > > Looks like the two characters after tab: were corrupted.
> > > Perhaps caused by conversion between encodings.
> >
> > The files are exactly the same on both systems. So the difference
> > should be in vim. What vim compile options affect the encodings?
> >
> > ttys009@10:00:55@~$ grep listchars ~/.vimrc |xxd
> > 00000000: 7365 7420 6c69 7374 6368 6172 733d 7461  set listchars=ta
> > 00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a    b:...\ ,eol:...
> > ttys009@10:01:06@~$ uname
> > Darwin
> >
> > 19a9967ba259:pts@16:01:37@~$ grep listchars ~/.vimrc |xxd
> > 00000000: 7365 7420 6c69 7374 6368 6172 733d 7461  set listchars=ta
> > 00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a    b:...\ ,eol:...
> > 19a9967ba259:pts@16:01:43@~$ uname
> > Linux
>
> It seems that the vim on ubuntu does not recognize the following
> triangle character. Any reason why it is so?
>
> - ▸

I don't know why it isn't working for you.  My vim 8.1.685 running
on Ubuntu 16.04.5 LTS and displaying to GNOME Terminal 2.32.0 over
an ssh connection works just fine.  I set 'listchars' like this in
my vimrc:

    :set listchars+=tab:▸-

where I copied and pasted that triangle from your email.

I also diffed your Ubuntu vim version info against mine and I didn't
see anything obvious to me that would cause such a problem.

(To diff the two "vim --version" outputs, I put them into two
side-by-side buffers (vertically split).  Then in each buffer,
I visually-selected the block of features and executed on them:

    :s/\_s\+/\r/g
    :sort /^./

Finally, I executed:

    :windo diffthis

That makes the differences pretty easy to see.)

Could this be a locale issue?  Mine is this:

    LANG=en_US.UTF-8
    LANGUAGE=
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE=C
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=

Regards,
Gary

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Tony Mechelynck
I see two possible reasons to this error.

Possibility 1: your Vim does not support multi-byte encodings such as
UTF-8. In that case, the output of ":version" will include -multi_byte
and the answer to ":echo has('multi_byte')" (with the single quotes
but without the double ones) will be 0. If this is the case, the only
solution is to use a more powerful Vim.

Possibility 2: even if Vim was built with +multi_byte, it might not
realize that your vimrc is in UTF-8. In that case, you should add, at
the very top of your vimrc (and in any case before the first line
containing a character with a Unicode codepoint higher than U+007F)
the line

        scriptencoding utf-8

See :help :scriptencoding

You might also want to make sure that Vim uses UTF-8 internally at
runtime, and not some 'encoding' incompatible with the characters
you're trying to use.

See https://vim.wikia.com/wiki/Working_with_Unicode


Best regards,
Tony.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Peng Yu
In reply to this post by Gary Johnson-4
I used a docker image of Ubuntu. Where I mounted my home as the home
of root in the docker container.

docker run -it --rm -v "$HOME":/root ubuntu

In the container, I run, then I would see `.vimrc [+] ` at the bottom
meaning the file has been change upon opening.

apt-get update
apt install vim
vim ~/.vimrc

I guess the problem is from the docker image. Could you help try it
and see if you can reproduce the problem?

>     :set listchars+=tab:▸-
>
> where I copied and pasted that triangle from your email.
>
> I also diffed your Ubuntu vim version info against mine and I didn't
> see anything obvious to me that would cause such a problem.

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

John Little-4
In reply to this post by Peng Yu
On Saturday, January 12, 2019 at 11:57:34 AM UTC+13, Peng Yu wrote:
> I got the following error

I looked into this and found a similarly weird bunch of errors, but *only* with my .vimrc.

TL;DR the fileencoding has been detected as latin1, and the "▸" fails to convert to latin1.  A solution may be to open the offending file, :set fileencoding=utf-8, then write the file.

The smallest example of the problem I see is a two byte file, with the hex bytes bb 0a:

»

If I edit it with vim, I get a [converted] message and it displays correctly.  If I then paste this into it

:set listchars+=tab:▸-

it looks ok, but if I then try to write it, there's conversion errors.

The cause, at least in my case, is that the .vimrc gets a detected with fileencoding=latin1 because there's a byte invalid for utf-8; vim converts it to utf-8 to show it, then converts back to latin1 on writing.

I think my .vimrc is vulnerable to these encoding snafus for two reasons.
Firstly, I like to use weird characters in listchars, for example "»", to use a character that's unlikely to appear in the files I edit.
Secondly, I've copied my .vimrc around many systems, going back decades, going back decades, including presumably systems that did not use utf-8, and it's accumulated a bunch of commented-out settings of listchars that have proved useful on various systems.  These have the encoding from those ancient systems, which are not valid utf-8.

I can see someone else having these two things and stumbling into this, perhaps using a conversion library that generates the horrible "?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?" text.

HTH, and regards, John Little

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Tony Mechelynck
In reply to this post by Peng Yu
On Sun, Jan 13, 2019 at 5:20 AM Peng Yu <[hidden email]> wrote:

>
> I used a docker image of Ubuntu. Where I mounted my home as the home
> of root in the docker container.
>
> docker run -it --rm -v "$HOME":/root ubuntu
>
> In the container, I run, then I would see `.vimrc [+] ` at the bottom
> meaning the file has been change upon opening.
>
> apt-get update
> apt install vim
> vim ~/.vimrc
>
> I guess the problem is from the docker image. Could you help try it
> and see if you can reproduce the problem?

No, I can't try it because I don't have Ubuntu. In the Vim which I
compile myself on openSUSE Linux 15.0 I don't see the problem. Could
you check what I said in my former post?
- What is the answer to ":echo has('multi_byte')" (without the double
quotes but with the single ones)
- What is the answer to ":set encoding?" (without the double quotes
but with the question mark)
- Is there a line "scriptencoding utf-8" (without the quotes) near the
top of your vimrc?


Regards,
Tony.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Peng Yu
On Sun, Jan 13, 2019 at 10:00 AM Tony Mechelynck
<[hidden email]> wrote:

>
> On Sun, Jan 13, 2019 at 5:20 AM Peng Yu <[hidden email]> wrote:
> >
> > I used a docker image of Ubuntu. Where I mounted my home as the home
> > of root in the docker container.
> >
> > docker run -it --rm -v "$HOME":/root ubuntu
> >
> > In the container, I run, then I would see `.vimrc [+] ` at the bottom
> > meaning the file has been change upon opening.
> >
> > apt-get update
> > apt install vim
> > vim ~/.vimrc
> >
> > I guess the problem is from the docker image. Could you help try it
> > and see if you can reproduce the problem?
>
> No, I can't try it because I don't have Ubuntu.

You can try docker on either Mac or Linux. Once docker is installed.
It is just one commands (shown in my previous email).

It will host a VM which is Linux.

> In the Vim which I
> compile myself on openSUSE Linux 15.0 I don't see the problem. Could
> you check what I said in my former post?
> - What is the answer to ":echo has('multi_byte')" (without the double
> quotes but with the single ones)

1

> - What is the answer to ":set encoding?" (without the double quotes
> but with the question mark)

  encoding=latin1

> - Is there a line "scriptencoding utf-8" (without the quotes) near the
> top of your vimrc?

That does not help.

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Tony Mechelynck
On Sun, Jan 13, 2019 at 6:43 PM Peng Yu <[hidden email]> wrote:

>
> On Sun, Jan 13, 2019 at 10:00 AM Tony Mechelynck
> <[hidden email]> wrote:
> >
> > On Sun, Jan 13, 2019 at 5:20 AM Peng Yu <[hidden email]> wrote:
> > >
> > > I used a docker image of Ubuntu. Where I mounted my home as the home
> > > of root in the docker container.
> > >
> > > docker run -it --rm -v "$HOME":/root ubuntu
> > >
> > > In the container, I run, then I would see `.vimrc [+] ` at the bottom
> > > meaning the file has been change upon opening.
> > >
> > > apt-get update
> > > apt install vim
> > > vim ~/.vimrc
> > >
> > > I guess the problem is from the docker image. Could you help try it
> > > and see if you can reproduce the problem?
> >
> > No, I can't try it because I don't have Ubuntu.
>
> You can try docker on either Mac or Linux. Once docker is installed.
> It is just one commands (shown in my previous email).
>
> It will host a VM which is Linux.
>
> > In the Vim which I
> > compile myself on openSUSE Linux 15.0 I don't see the problem. Could
> > you check what I said in my former post?
> > - What is the answer to ":echo has('multi_byte')" (without the double
> > quotes but with the single ones)
>
> 1
>
> > - What is the answer to ":set encoding?" (without the double quotes
> > but with the question mark)
>
>   encoding=latin1

This is the problematic setting. In Latin1 encoding, Vim can only
represent in its internal memory the 256 characters supported by
Latin1, and that dark triangle is not one of them. See at
https://vim.wikia.com/wiki/Working_with_Unicode (which my previous
post also mentioned) how to set up Vim so that it can handle any
Unicode codepoint.

>
> > - Is there a line "scriptencoding utf-8" (without the quotes) near the
> > top of your vimrc?
>
> That does not help.
>
> --
> Regards,
> Peng
>
> --
> --
> You received this message from the "vim_use" 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_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Peng Yu
> This is the problematic setting. In Latin1 encoding, Vim can only
> represent in its internal memory the 256 characters supported by
> Latin1, and that dark triangle is not one of them. See at
> https://vim.wikia.com/wiki/Working_with_Unicode (which my previous
> post also mentioned) how to set up Vim so that it can handle any
> Unicode codepoint.

I download the vim source code and compiled it from scratch on the
ubuntu docker container. But vim still does not recognize UTF-8
characters.

Why is it so? Shouldn't vim recognize UTF-8 characters out-of-the-box?

I put the following code at the beginning of my viimrc. I don't see
the problem solved either.

if has("multi_byte")
  if &termencoding == ""
    let &termencoding = &encoding
  endif
  set encoding=utf-8
  setglobal fileencoding=utf-8
  "setglobal bomb
  set fileencodings=ucs-bom,utf-8,latin1
endif

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Tony Mechelynck
On Mon, Jan 14, 2019 at 5:16 AM Peng Yu <[hidden email]> wrote:

>
> > This is the problematic setting. In Latin1 encoding, Vim can only
> > represent in its internal memory the 256 characters supported by
> > Latin1, and that dark triangle is not one of them. See at
> > https://vim.wikia.com/wiki/Working_with_Unicode (which my previous
> > post also mentioned) how to set up Vim so that it can handle any
> > Unicode codepoint.
>
> I download the vim source code and compiled it from scratch on the
> ubuntu docker container. But vim still does not recognize UTF-8
> characters.
>
> Why is it so? Shouldn't vim recognize UTF-8 characters out-of-the-box?

Yes and no. It's complicated to explain.

>
> I put the following code at the beginning of my viimrc. I don't see
> the problem solved either.
>
> if has("multi_byte")
>   if &termencoding == ""
>     let &termencoding = &encoding
>   endif
>   set encoding=utf-8
>   setglobal fileencoding=utf-8
>   "setglobal bomb
>   set fileencodings=ucs-bom,utf-8,latin1
> endif
>
> --
> Regards,
> Peng

Somewhere inside that outer if..endif block, add

        scriptencoding utf-8

and you might also add the following just before the "endif" line:ee

else
        echoerr "Error: Multi-byte not supported"

Then do
  :setlocal fenc?
in your vimrc, and if the answer is latin1, hit 8g8 to find any
illegal UTF-8 byte sequences, and if there is one, correct it, then
repeat until there are none left. Then :e to reload it, its
'fileencoding' should be utf-8. Edit it some more if you want. Then
restart Vim.


Best regards,
Tony.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Gary Johnson-4
In reply to this post by Peng Yu
On 2019-01-13, Peng Yu wrote:

> > This is the problematic setting. In Latin1 encoding, Vim can only
> > represent in its internal memory the 256 characters supported by
> > Latin1, and that dark triangle is not one of them. See at
> > https://vim.wikia.com/wiki/Working_with_Unicode (which my previous
> > post also mentioned) how to set up Vim so that it can handle any
> > Unicode codepoint.
>
> I download the vim source code and compiled it from scratch on the
> ubuntu docker container. But vim still does not recognize UTF-8
> characters.
>
> Why is it so? Shouldn't vim recognize UTF-8 characters out-of-the-box?
>
> I put the following code at the beginning of my viimrc. I don't see
> the problem solved either.
>
> if has("multi_byte")
>   if &termencoding == ""
>     let &termencoding = &encoding
>   endif
>   set encoding=utf-8
>   setglobal fileencoding=utf-8
>   "setglobal bomb
>   set fileencodings=ucs-bom,utf-8,latin1
> endif

I'm pretty sure now that this is a conflict between your locale
setting and the character set used in your vimrc.  The machine on
which I have docker installed isn't working at the moment, so
I tried a different experiment.  On a machine running Ubuntu 16.04,
I executed the following:

    $ LANG=POSIX
    $ vim
    Error detected while processing
    /home/gary/.vim/vimrc:
    line  928:
    E474: Invalid argument: listchars+=tab:�~V�-
    Press ENTER or type command to continue
    :set enc?
      encoding=latin1

I repeated the experiment with LANG=C with the same results.  The
error is at the line where I assign your little triangle to
'listchars'.  I don't see this error when my locale is set for
UTF-8, as it is by default.  This seems to confirm that your docker
installation of Ubuntu is set up for some encoding other than UTF-8.
That locale setting tells vim to expect the files it sources,
including vimrc, to contain only characters from that character set.

As a solution to this, I added the following at the top of my vimrc:

    set encoding=utf-8
    scriptencoding utf-8

per ":help :scriptencoding".

With that, I see no errors when I start VIM in the POSIX or
C locale.

You could also execute this in your docker container's shell:

    $ locale -a

and see if your language and UTF-8 encoding is supported.  If it is,
then just set LANG to that in your ~/.profile, or whatever the
preferred file du jour is for that sort of thing these days.

Regards,
Gary

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: =?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?tchars=tab:?~V?\_,eol:¬^[^[?MIME-Version: 1.0

Peng Yu
> You could also execute this in your docker container's shell:
>
>     $ locale -a
>
> and see if your language and UTF-8 encoding is supported.  If it is,
> then just set LANG to that in your ~/.profile, or whatever the
> preferred file du jour is for that sort of thing these days.

This solves the problem. I think that it is the best solution to this problem.

$ locale -a
C
C.UTF-8
POSIX
e000c0cf8d77:pts@05:44:49@~$ export LANG=C.UTF-8
e000c0cf8d77:pts@05:44:57@~$ vim ~/.vimrc

--
Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
12