Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8C4D8431FC1 for ; Sat, 5 Jun 2010 04:13:28 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OnpgBDDGtwR7 for ; Sat, 5 Jun 2010 04:13:16 -0700 (PDT) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) by olra.theworths.org (Postfix) with ESMTP id 965394196F5 for ; Sat, 5 Jun 2010 04:13:00 -0700 (PDT) Received: by mail-bw0-f53.google.com with SMTP id 12so686857bwz.26 for ; Sat, 05 Jun 2010 04:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=EJ/UUPOwtXZj8rNYOzBDRlkHndycn/PqYcGd+1S0ZB8=; b=oMbtBl3lMVVQT0MdvkwbRwNulVQLJsb0ZiBJdUM5ko1dPHDyMhbH2tA7z7TRaLsctT GuhNYBby67V714hILFF5WrFjbygTD318Tgsek+XOQ3l0e+i7aRpfY5P0ZIZuaHAFuAgo bnm/McKc8taeMYbgVD9DkuepSZICaEwXVD5iY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=ibTxTa4R7roExLQiPba/nm2qI7BLCCoI0RDhAaCkZP8XvFVHDdcklpujB4mvIiFR+b IeH/H36wYbotapLpNbw98BVwpsItj9QLPXIr3VxUrDVgi6Fq+mZnB8Rp/fyJ3B7pvh5T sIilwhSQX23mB2IT3uGENTJQl1gOFb58MEcaE= Received: by 10.204.83.98 with SMTP id e34mr4833864bkl.99.1275736380260; Sat, 05 Jun 2010 04:13:00 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id v14sm9575850bkz.20.2010.06.05.04.12.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Jun 2010 04:12:59 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 4/9] vim: cleanup search syntax Date: Sat, 5 Jun 2010 14:12:37 +0300 Message-Id: <1275736362-22771-5-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1275736362-22771-1-git-send-email-felipe.contreras@gmail.com> References: <1275736362-22771-1-git-send-email-felipe.contreras@gmail.com> Cc: Bart Trojanowski X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jun 2010 11:13:28 -0000 It was *sloooooow*. Signed-off-by: Felipe Contreras --- vim/syntax/notmuch-search.vim | 36 ++++++++++++------------------------ 1 files changed, 12 insertions(+), 24 deletions(-) diff --git a/vim/syntax/notmuch-search.vim b/vim/syntax/notmuch-search.vim index 71839fd..f458d77 100644 --- a/vim/syntax/notmuch-search.vim +++ b/vim/syntax/notmuch-search.vim @@ -1,24 +1,12 @@ -" notmuch search mode syntax file - -" TODO: I cannot figure out why nmSearchTags is not matching anything :( - -syntax region nmSearchDate start='^' end='\%13v' oneline -syntax region nmSearchCountAndFrom start='\%14v\[' end='|' oneline contains=nmSearchCount,nmSearchFrom -syntax region nmSearchCount start='\[' end='\]' oneline contained contains=nmSearchCountZero,nmSearchCountSome,nmSearchCountAll -syntax region nmSearchFrom start='\]\@<=' end='|' oneline contained -syntax match nmSearchCountZero '0/\(\d\+\)' contained -syntax match nmSearchCountSome '\([1-9]\d*\)/\(\d\+\)' contained -syntax match nmSearchCountAll '\(\d\+\)/\1' contained -syntax match nmSearchSquareBracketText '\(\[\w\+\]\)' -syntax match nmSearchTags /([^)]\+)$/ - -highlight link nmSearchDate Statement -"highlight link nmSearchCount Comment -highlight link nmSearchCountZero Function -highlight link nmSearchCountSome Special -highlight link nmSearchCountAll Type -highlight link nmSearchFrom Include -highlight link nmSearchSquareBracketText Special -highlight link nmSearchTags String - -highlight CursorLine term=reverse cterm=reverse gui=reverse +syntax region nmSearch start=/^/ end=/$/ oneline contains=nmSearchDate +syntax match nmSearchDate /^.\{-13}/ contained nextgroup=nmSearchNum +syntax match nmSearchNum /.\{-4}/ contained nextgroup=nmSearchFrom +syntax match nmSearchFrom /.\{-21}/ contained nextgroup=nmSearchSubject +syntax match nmSearchSubject /.\{0,}\(([^()]\+)$\)\@=/ contained nextgroup=nmSearchTags +syntax match nmSearchTags /.\+$/ contained + +highlight link nmSearchDate Statement +highlight link nmSearchNum Type +highlight link nmSearchFrom Include +highlight link nmSearchSubject Normal +highlight link nmSearchTags String -- 1.7.1