--
--
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 a topic in the Google Groups "vim_dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/EKDS1PP4rPo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Or when users want to set &textwidth for use with automatic formatting of comments with 'c' in the formatoptions.
On Tuesday, October 1, 2013 12:16:38 PM UTC-3, David Barnett wrote:
> I'm confident we can get consensus to at least remove a few of those formatoptions modifications. You should also add "setlocal formatoptions-=t" in pretty much every case (unless your syntax is fine with any arbitrary space being converted to a newline).
The concept above is right. Most fo options should not be set in an ftplugin file. Only fo+=t is needed for Fortran code where the ISO standard mandates maximum line lengths. I have incorporated this change along with other unrelated ones I was planning to make in ftplugin/fortran.vim. I have sent the updated file to Bram.
Ajit
I once used a variant of this:
http://vim.wikia.com/wiki/Highlight_long_lines#Toggle_matching_based_on_textwidth
which would fire on autocmds (I think it was WinEnter and CursorHold) to re-apply the highlight based on textwidth.
But then colorcolumn was introduced and I got rid of it.
Can we agree that every standard ftplugin should have
setlocal formatoptions-=t
? I should be able to enable 'textwidth' to get a colorcolumn without bizarre side-effects.
The only filetypes I've encountered so far that could be the exceptions are
* text (where any space indeed can become a newline without breaking semantics)
* gitcommit (where some buffer contents are structured but any text inserted is plaintext safe to wrap)
* possibly markdown (very lightly-structured text, auto-wrapping is rarely a problem)
David