Hi tot-to,

Unfortunately, your mail was filtered to the spam folder by Gmail...

2016-01-02 15:06 GMT+09:00 tot-to <vim.org.l...@tot-to.com>:

> Hi Ken,
>
> Thanks, it says "Last set from /etc/vim/vimrc"
>
> I've found the place in that file, where it sets the variable. This is
> apparently distribution (Gentoo) specific settings:
>


> 159   " In text files, limit the width of text to 78 characters, but be
> careful
> 160   " that we don't override the user's setting.
> 161   autocmd BufNewFile,BufRead *.txt
> 162         \ if &tw == 0 && ! exists("g:leave_my_textwidth_alone") |
> 163         \     setlocal textwidth=78 |
> 164         \ endif
>


> Commenting the string #163 resolves the issue. But I still wonder why it
> is not being overridden by my ~/.vimrc, where I have "set textwidth=0"?
>

Because the /etc/vim/vimrc uses autocmd, textwidth is set when you open a
file.
As you can see in the line 162, setting g:leave_my_textwidth_alone might
solve the problem.
Try to add this line in your .vimrc:

  let g:leave_my_textwidth_alone=1

Another solution might be:

  autocmd FileType text setlocal textwidth=0


Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui