On Wed, Mar 09, 2016 at 01:34:46AM -0800, 童虎 wrote: > I have a file `a.txt`. > When I use root to edit this file `sudo vi a.txt`. Vim prompt: > > `E474: Invalid argument: > listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣` > > But when I user `vi a.txt` without `sudo`. All things right. > > I have tried this: > http://stackoverflow.com/questions/18321538/vim-error-e474-invalid-argument-listchars-tab-trail > > scriptencoding utf-8 > set encoding=utf-8 > > It does nothing! > > Can you help me!!
It's probably that your listchars setting contains UTF-8 characters, but your locale as root isn't a UTF-8 locale -- sudo isn't preserving it. Danek -- -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
