git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* commit message columns
@ 2007-01-22 21:19 J. Bruce Fields
  2007-01-22 21:23 ` Jimmy Tang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: J. Bruce Fields @ 2007-01-22 21:19 UTC (permalink / raw)
  To: git

Uh, I feel like I must be missing something simple here--when editing
commit messages, you'd like the editor (vim in my case) to wrap text
sooner than it normally would, since commit messages are displayed
indented.  What's the easiest way to ensure this always happens?

--b.

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

* Re: commit message columns
  2007-01-22 21:19 commit message columns J. Bruce Fields
@ 2007-01-22 21:23 ` Jimmy Tang
  2007-01-22 21:44   ` J. Bruce Fields
  2007-01-22 21:23 ` Shawn O. Pearce
  2007-01-22 22:19 ` Matthias Lederhofer
  2 siblings, 1 reply; 6+ messages in thread
From: Jimmy Tang @ 2007-01-22 21:23 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: git

Hi,

On Mon, Jan 22, 2007 at 04:19:02PM -0500, J. Bruce Fields wrote:
> Uh, I feel like I must be missing something simple here--when editing
> commit messages, you'd like the editor (vim in my case) to wrap text
> sooner than it normally would, since commit messages are displayed
> indented.  What's the easiest way to ensure this always happens?

vim -c 'set tw=60'

where 60 is the column width. dont know how useful that is to you though


Jimmy.


-- 
Jimmy Tang
Trinity Centre for High Performance Computing,
Lloyd Building, Trinity College Dublin, Dublin 2, Ireland.
http://www.tchpc.tcd.ie/ | http://www.tchpc.tcd.ie/~jtang

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

* Re: commit message columns
  2007-01-22 21:19 commit message columns J. Bruce Fields
  2007-01-22 21:23 ` Jimmy Tang
@ 2007-01-22 21:23 ` Shawn O. Pearce
  2007-01-22 22:19 ` Matthias Lederhofer
  2 siblings, 0 replies; 6+ messages in thread
From: Shawn O. Pearce @ 2007-01-22 21:23 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: git

"J. Bruce Fields" <bfields@fieldses.org> wrote:
> Uh, I feel like I must be missing something simple here--when editing
> commit messages, you'd like the editor (vim in my case) to wrap text
> sooner than it normally would, since commit messages are displayed
> indented.  What's the easiest way to ensure this always happens?

<shameless-plug>
Use git-gui.  The message buffer window doesn't linewrap nor does
it scroll, so you learn to linewrap on your own.  :-)
</shameless-plug>

When I'm not in git-gui I use vile and have a macro in it to
pass the current paragraph of text through:

  fmt --crown-margin --width=70 --uniform-spacing

works reasonably well.

-- 
Shawn.

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

* Re: commit message columns
  2007-01-22 21:23 ` Jimmy Tang
@ 2007-01-22 21:44   ` J. Bruce Fields
  0 siblings, 0 replies; 6+ messages in thread
From: J. Bruce Fields @ 2007-01-22 21:44 UTC (permalink / raw)
  To: Jimmy Tang; +Cc: git

On Mon, Jan 22, 2007 at 09:23:04PM +0000, Jimmy Tang wrote:
> Hi,
> 
> On Mon, Jan 22, 2007 at 04:19:02PM -0500, J. Bruce Fields wrote:
> > Uh, I feel like I must be missing something simple here--when editing
> > commit messages, you'd like the editor (vim in my case) to wrap text
> > sooner than it normally would, since commit messages are displayed
> > indented.  What's the easiest way to ensure this always happens?
> 
> vim -c 'set tw=60'
> 
> where 60 is the column width. dont know how useful that is to you though

I was trying to figure out how to get that for git's invocations of vim,
but not all others.

But, come to think of it, maybe I'd rather have the textwidth just be 72
everywhere.

--b.

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

* Re: commit message columns
  2007-01-22 21:19 commit message columns J. Bruce Fields
  2007-01-22 21:23 ` Jimmy Tang
  2007-01-22 21:23 ` Shawn O. Pearce
@ 2007-01-22 22:19 ` Matthias Lederhofer
  2007-01-23  5:17   ` Jeff King
  2 siblings, 1 reply; 6+ messages in thread
From: Matthias Lederhofer @ 2007-01-22 22:19 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: git

J. Bruce Fields <bfields@fieldses.org> wrote:
> Uh, I feel like I must be missing something simple here--when editing
> commit messages, you'd like the editor (vim in my case) to wrap text
> sooner than it normally would, since commit messages are displayed
> indented.  What's the easiest way to ensure this always happens?

You could add this to your .vimrc:
> autocmd BufNewFile,BufRead .git/COMMIT_EDITMSG setlocal tw=60 ft=human
Has anyone a good filetype for this?

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

* Re: commit message columns
  2007-01-22 22:19 ` Matthias Lederhofer
@ 2007-01-23  5:17   ` Jeff King
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2007-01-23  5:17 UTC (permalink / raw)
  To: J. Bruce Fields, git

On Mon, Jan 22, 2007 at 11:19:27PM +0100, Matthias Lederhofer wrote:

> You could add this to your .vimrc:
> > autocmd BufNewFile,BufRead .git/COMMIT_EDITMSG setlocal tw=60 ft=human
> Has anyone a good filetype for this?

I do the same thing, but I use filetype=gitcommit. Then it picks up the
syntax highlighting file automatically (see contrib/vim).

-Peff

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

end of thread, other threads:[~2007-01-23  5:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-22 21:19 commit message columns J. Bruce Fields
2007-01-22 21:23 ` Jimmy Tang
2007-01-22 21:44   ` J. Bruce Fields
2007-01-22 21:23 ` Shawn O. Pearce
2007-01-22 22:19 ` Matthias Lederhofer
2007-01-23  5:17   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).