Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] tiny patch re: editor (vim)
@ 2011-02-16 17:34 Christer Edwards
  2011-02-16 18:35 ` Matias Aguirre
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christer Edwards @ 2011-02-16 17:34 UTC (permalink / raw)
  To: sup-talk


[-- Attachment #1.1: Type: text/plain, Size: 1175 bytes --]

I've always been told that email text length should be limited to 72
characters. I did some more research this morning in preparation for
sharing this and I find that according to RFC 2822 it should be 78
characters. I then continue to find more and more discussion about how
it "doesn't matter" or "use whatever you want".

In any case, below is a tiny patch to configure vim to wrap text at 72
characters. This patch is specific to the initial file that is used at
sup-config, but the same line could be edited in your local
.sup/config.yaml.

In any case, see the example below to configure your textwidth.


--- lib/sup.rb  2011-02-16 09:08:19.373333347 -0700
+++ lib/sup.rb.new  2011-02-16 09:20:07.816666681 -0700
@@ -289,7 +289,7 @@
             :gpgkey => ""
           }
         },
-        :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail'",
+        :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail' -c 'set textwidth=72'",
         :thread_by_subject => false,
         :edit_signature => false,
         :ask_for_from => false,

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [sup-talk] tiny patch re: editor (vim)
  2011-02-16 17:34 [sup-talk] tiny patch re: editor (vim) Christer Edwards
@ 2011-02-16 18:35 ` Matias Aguirre
  2011-02-16 18:42 ` Ico Doornekamp
  2011-02-16 19:08 ` Ben Walton
  2 siblings, 0 replies; 4+ messages in thread
From: Matias Aguirre @ 2011-02-16 18:35 UTC (permalink / raw)
  To: sup-talk

Regardless I prefer 72 chars line width, this is more a personal choice
than a forced standard, instead I suggest you to put this to your .vimrc

autocmd FileType mail set textwidth=72

Will have the same effect.

Cheers,
Matías

Excerpts from Christer Edwards's message of Wed Feb 16 15:34:39 -0200 2011:
> I've always been told that email text length should be limited to 72
> characters. I did some more research this morning in preparation for
> sharing this and I find that according to RFC 2822 it should be 78
> characters. I then continue to find more and more discussion about how
> it "doesn't matter" or "use whatever you want".
> 
> In any case, below is a tiny patch to configure vim to wrap text at 72
> characters. This patch is specific to the initial file that is used at
> sup-config, but the same line could be edited in your local
> .sup/config.yaml.
> 
> In any case, see the example below to configure your textwidth.
> 
> 
> --- lib/sup.rb  2011-02-16 09:08:19.373333347 -0700
> +++ lib/sup.rb.new  2011-02-16 09:20:07.816666681 -0700
> @@ -289,7 +289,7 @@
>              :gpgkey => ""
>            }
>          },
> -        :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail'",
> +        :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail' -c 'set textwidth=72'",
>          :thread_by_subject => false,
>          :edit_signature => false,
>          :ask_for_from => false,
-- 
Matías Aguirre <matiasaguirre@gmail.com>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [sup-talk] tiny patch re: editor (vim)
  2011-02-16 17:34 [sup-talk] tiny patch re: editor (vim) Christer Edwards
  2011-02-16 18:35 ` Matias Aguirre
@ 2011-02-16 18:42 ` Ico Doornekamp
  2011-02-16 19:08 ` Ben Walton
  2 siblings, 0 replies; 4+ messages in thread
From: Ico Doornekamp @ 2011-02-16 18:42 UTC (permalink / raw)
  To: sup-talk

* On Wed Feb 16 18:34:39 +0100 2011, Christer Edwards wrote:
 
> In any case, below is a tiny patch to configure vim to wrap text at 72
> characters. This patch is specific to the initial file that is used at
> sup-config, but the same line could be edited in your local
> .sup/config.yaml.
> 
> In any case, see the example below to configure your textwidth.
> 
> 
> --- lib/sup.rb  2011-02-16 09:08:19.373333347 -0700
> +++ lib/sup.rb.new  2011-02-16 09:20:07.816666681 -0700
> @@ -289,7 +289,7 @@
>              :gpgkey => ""
>            }
>          },
> -        :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail'",
> +        :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail' -c 'set textwidth=72'",
>          :thread_by_subject => false,
>          :edit_signature => false,
>          :ask_for_from => false,

Funny, the default vim comes with the 'mail' filetype plugin which
already handles setting the text width to 72, so I never needed to do
anything to get this behaviour. Strange that this does not work for you
out of the box

-- 
:wq
^X^Cy^K^X^C^C^C^C
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [sup-talk] tiny patch re: editor (vim)
  2011-02-16 17:34 [sup-talk] tiny patch re: editor (vim) Christer Edwards
  2011-02-16 18:35 ` Matias Aguirre
  2011-02-16 18:42 ` Ico Doornekamp
@ 2011-02-16 19:08 ` Ben Walton
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Walton @ 2011-02-16 19:08 UTC (permalink / raw)
  To: sup-talk

Excerpts from Christer Edwards's message of Wed Feb 16 12:34:39 -0500 2011:

Hi Christer,

> In any case, see the example below to configure your textwidth.

Your patch looks fine, but I question why we would do anything other
than call vim in the default case?  Passing default settings like this
(including the existing options) should be beyond the scope of the
mail client in my opinion.

That being said, if others like the patch, by all means apply it.  I
don't use vim and I specifically configure my environment so it won't
affect me. :)

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-16 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 17:34 [sup-talk] tiny patch re: editor (vim) Christer Edwards
2011-02-16 18:35 ` Matias Aguirre
2011-02-16 18:42 ` Ico Doornekamp
2011-02-16 19:08 ` Ben Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox