Thursday, November 21, 2013

Re: Modeline/Special Character Errors

On Thursday, November 21, 2013 4:04:55 PM UTC-6, Ari wrote:
> Hi all,
>
> When I open a pre-existing file with gVim 7.4 (on Windows 8), gVim complains about modeline issues, i.e. complaining that there are special characters at the end of the file like: ^J or ^M. Does anyone know how to resolve this? I added "set nocompatible" to the _vimrc (.vimrc) file.
>

This is caused by having the word "Vim" somewhere in that file. You can turn off modelines in your _vimrc, via a BufReadPre autocmd, or as "toothpik" suggests from the command-line when you invoke Vim.

> Moreover, the formatting of files are not maintained. For example, when I open a file in Emacs the content includes return, tab, etc. characters; however, when I open the same file in gVim, the content is displayed in a straight line. Example follows. Does anyone what is the cause of this issue and how to resolve it?
>
> Emacs:
>
> {
> "name": Ari,
> "tools": ["Emacs", "Vi", "Vim"],
> ...
> }
>
> gVim:
>
> { "name": Ari, "tools": ["Emacs", "Vi", "Vim"], ... }
>
> Thanks.
>
> -Ari

This sounds like it COULD be an issue with either your 'fileformat' or 'fileformats' options, but I'm not sure why it would be all on one line unless you somehow have a file with old Mac-style line endings.

Anyway, take a look at http://vim.wikia.com/wiki/File_format#Results_of_incorrect_file_format_detection to see if you can figure out what's going on there.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: