Loading ...
Sorry, an error occurred while loading the content.

128035Re: why is Vim coloring text in txt files?

Expand Messages
  • Tony Mechelynck
    Jan 1, 2012
      On 01/01/12 00:33, wolfv wrote:
      >
      >
      > On Dec 31, 2:33 pm, Tony Mechelynck<antoine.mechely...@...>
      > wrote:
      >> On 31/12/11 21:44, wolfv wrote:
      >> Try
      >> :verbose setlocal tw? wm? fo?
      >> :echo $HOME
      >> :scriptnames
      >>
      >> while editing a text file. Then check the help for these options (and
      >> |fo-table| for the latter one).
      >>
      >> The 2nd and 3rd ex-commands above are to make sure that you put the
      >> text.vim script at some location where Vim looked for it.
      >>
      >>
      >>
      >>> 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?
      >>
      >> I don't know yet, but maybe the answer to the question above will help
      >> us debug the problem.
      >
      >
      > :verbose setlocal tw? wm? fo?
      > textwidth=78
      > Last set from C:\Program Files (x86)\Vim
      > \vim73\vimrc_example.vim
      > wrapmargin=0
      > formatoptions=tcq
      > Last set from C:\Program Files (x86)\Vim
      > \vim73\vimrc_example.vim
      >
      > :echo $HOME
      > C:\Users\wolf
      >
      > :scriptnames
      > C:\Program Files (x86)\Vim\vimfiles\filetype.vim
      > C:\Users\wolf\vimfiles\after\ftplugin\text.vim
      > ... and 27 other files
      >
      > After this command, the auto-carriage-return insert stopped:
      > :setl textwidth=0
      >
      > so I added it to _vimrc:
      > au BufRead,BufNewFile *.txt setlocal spell textwidth=0
      >
      > thereafter:
      > :verbose setlocal tw?
      > textwidth=0
      > Last set from C:\Program Files (x86)\Vim\vim\_vimrc
      >
      > That fixed it!
      > Once again Tony, thank you for your help.
      >

      You have the case I mentioned in one of my recent posts: you are
      sourcing the vimrc_example.vim; so you could have added (after the point
      where you source it) the following line in your vimrc:

      au! vimrcEx FileType text

      Remember: DO NOT modify the vimrc_example.vim itself (or anything else
      in the $VIMRUNTIME tree), because any upgrade may silently replace it,
      thus removing any changes you could have made in it.


      Best regards,
      Tony.
      --
      Cahn's Axiom:
      When all else fails, read the instructions.

      --
      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
    • Show all 42 messages in this topic