Saturday, December 31, 2011

Re: why is Vim coloring text in txt files?

On Dec 31, 11:59 am, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> add a file $HOME/vimfiles/after/ftplugin/text.vim (for Windows)
> In that file, either the following commands:
>
> setlocal wm=0
> let &l:tw = &columns

Tony I tried both " setlocal wm=0" and "let &l:tw = &columns" (one at
a time) in $HOME/vimfiles/after/ftplugin/text.vim, but neither line
worked.

Now that I look at the problem more closely, I don't think text is
wrapping, but a carriage return is being inserted automatically. I
made hidden characters visible:
:set invlist
A blue "$" (carriage return) is visible at end of each line.

The lines wrap at column 100 as they should.
However, when the cursor crosses column 80 while I am typing, the
first whitespace left of column 80 is automatically replaced by a blue
"$" (carriage return).

I don't get the auto-carriage return when I comment this line in
filetype.vim:
au BufRead,BufNewFile *.txt,README*,LISEZMOI*,LIESMICH*,LEESMIJ*
setf text
Is the auto-carriage return a text-file feature?
How to turn it off?

Thank you for all your help. I didn't think it would take so long.

--
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

No comments: