git/list[1] front-page[2] threads[3] people[4] search[5] about
 

New sharness/test vim syntax

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 26, 2020, 10:24 UTC
Message-ID
<CAMP44s1D-Zp3KDS+Hi74a=Lkc7Nc_0qiEzQEF0Pmj=bD8i+=JQ@mail.gmail.com>
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
Next: Jeff King
Message 1 of 4 in “New sharness/test vim syntax”
  1. Felipe ContrerasNov 26, 2020
  2. Jeff KingDec 8, 2020
  3. Emily ShafferDec 8, 2020
  4. Felipe ContrerasDec 9, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.