* New sharness/test vim syntax
@ 2020-11-26 10:24 Felipe Contreras
2020-12-08 17:56 ` Jeff King
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Contreras @ 2020-11-26 10:24 UTC (permalink / raw)
To: Git
Hello,
It gets a bit tedious to see all the tests in the same color, so I
wrote my own vim syntax file so that at least the body of
test_expect_success is highlighted properly.
I've updated it to make it handle more cases, and the result doesn't
look bad at all:
https://i.imgur.com/qDgvjtu.png
You can find it on my dotfiles:
https://github.com/felipec/dotfiles/blob/master/.vim/syntax/sharness.vim
What I do is place it on ~/.vim/syntax/sharness.vim, and then add the
following to my ~/.vimrc:
au! BufRead,BufNewFile */git/t/*.sh set ft=sharness
I hope you find this useful.
Cheers.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New sharness/test vim syntax
2020-11-26 10:24 New sharness/test vim syntax Felipe Contreras
@ 2020-12-08 17:56 ` Jeff King
2020-12-08 21:54 ` Emily Shaffer
0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2020-12-08 17:56 UTC (permalink / raw)
To: Felipe Contreras; +Cc: Git
On Thu, Nov 26, 2020 at 04:24:42AM -0600, Felipe Contreras wrote:
> It gets a bit tedious to see all the tests in the same color, so I
> wrote my own vim syntax file so that at least the body of
> test_expect_success is highlighted properly.
Thanks for sharing this. Over the years I've gotten used to the horrible
all-red view when editing our test scripts, but I'm looking forward to
leaving that behind. :)
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New sharness/test vim syntax
2020-12-08 17:56 ` Jeff King
@ 2020-12-08 21:54 ` Emily Shaffer
2020-12-09 0:30 ` Felipe Contreras
0 siblings, 1 reply; 4+ messages in thread
From: Emily Shaffer @ 2020-12-08 21:54 UTC (permalink / raw)
To: Jeff King; +Cc: Felipe Contreras, Git
On Tue, Dec 08, 2020 at 12:56:29PM -0500, Jeff King wrote:
>
> On Thu, Nov 26, 2020 at 04:24:42AM -0600, Felipe Contreras wrote:
>
> > It gets a bit tedious to see all the tests in the same color, so I
> > wrote my own vim syntax file so that at least the body of
> > test_expect_success is highlighted properly.
>
> Thanks for sharing this. Over the years I've gotten used to the horrible
> all-red view when editing our test scripts, but I'm looking forward to
> leaving that behind. :)
Thanks for bumping this mail, Peff - I saw it come in, said "oh heck
yeah, I'll install that later" ... and then forgot :)
But I've installed it now. This is awesome. Thanks for sharing it
Felipe!
- Emily
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New sharness/test vim syntax
2020-12-08 21:54 ` Emily Shaffer
@ 2020-12-09 0:30 ` Felipe Contreras
0 siblings, 0 replies; 4+ messages in thread
From: Felipe Contreras @ 2020-12-09 0:30 UTC (permalink / raw)
To: Emily Shaffer; +Cc: Jeff King, Git
On Tue, Dec 8, 2020 at 3:54 PM Emily Shaffer <emilyshaffer@google.com> wrote:
>
> On Tue, Dec 08, 2020 at 12:56:29PM -0500, Jeff King wrote:
> >
> > On Thu, Nov 26, 2020 at 04:24:42AM -0600, Felipe Contreras wrote:
> >
> > > It gets a bit tedious to see all the tests in the same color, so I
> > > wrote my own vim syntax file so that at least the body of
> > > test_expect_success is highlighted properly.
> >
> > Thanks for sharing this. Over the years I've gotten used to the horrible
> > all-red view when editing our test scripts, but I'm looking forward to
> > leaving that behind. :)
>
> Thanks for bumping this mail, Peff - I saw it come in, said "oh heck
> yeah, I'll install that later" ... and then forgot :)
>
> But I've installed it now. This is awesome. Thanks for sharing it
> Felipe!
You're welcome!
I also sent a patch to add a project-wide .vimrc file, to minimize the
burden on each individual developer.
A little bit of quality of life never hurts.
Cheers.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-09 0:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-26 10:24 New sharness/test vim syntax Felipe Contreras
2020-12-08 17:56 ` Jeff King
2020-12-08 21:54 ` Emily Shaffer
2020-12-09 0:30 ` Felipe Contreras
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).