From 8eed308128653d32515055f1861b4bf7cca1bb17 Mon Sep 17 00:00:00 2001 From: Bartosz Date: Sat, 10 Jan 2015 13:03:01 +0100 Subject: [PATCH] [PATCH 1/4] VIM: implemented message folding in thread view --- dc/634f980b95632e4742cd70bc8302d8042265ec | 78 +++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 dc/634f980b95632e4742cd70bc8302d8042265ec diff --git a/dc/634f980b95632e4742cd70bc8302d8042265ec b/dc/634f980b95632e4742cd70bc8302d8042265ec new file mode 100644 index 000000000..2c9af65b4 --- /dev/null +++ b/dc/634f980b95632e4742cd70bc8302d8042265ec @@ -0,0 +1,78 @@ +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 2AC6A429E44 + for ; Sat, 10 Jan 2015 04:03:38 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled +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 MZdnSSeakhpN for ; + Sat, 10 Jan 2015 04:03:33 -0800 (PST) +Received: from smtp.webfaction.com (mail6.webfaction.com [74.55.86.74]) + by olra.theworths.org (Postfix) with ESMTP id CAC34429E41 + for ; Sat, 10 Jan 2015 04:03:33 -0800 (PST) +Received: from localhost (87-231-242-54.rev.numericable.fr [87.231.242.54]) + by smtp.webfaction.com (Postfix) with ESMTP id CA0D659A3AB9; + Sat, 10 Jan 2015 12:03:28 +0000 (UTC) +From: Bartosz +To: notmuch@notmuchmail.org +Subject: [PATCH 1/4] VIM: implemented message folding in thread view +Date: Sat, 10 Jan 2015 13:03:01 +0100 +Message-Id: <1420891384-992-2-git-send-email-telenczuk@unic.cnrs-gif.fr> +X-Mailer: git-send-email 1.9.3 (Apple Git-50) +In-Reply-To: <1420891384-992-1-git-send-email-telenczuk@unic.cnrs-gif.fr> +References: <1420891384-992-1-git-send-email-telenczuk@unic.cnrs-gif.fr> +X-Mailman-Approved-At: Sat, 10 Jan 2015 10:22:23 -0800 +Cc: Bartosz +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, 10 Jan 2015 12:03:38 -0000 + +--- + vim/notmuch.vim | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/vim/notmuch.vim b/vim/notmuch.vim +index cad9517..34d4f92 100644 +--- a/vim/notmuch.vim ++++ b/vim/notmuch.vim +@@ -345,8 +345,13 @@ ruby << EOF + VIM::command("syntax region nmShowMsg#{i}Desc start='\\%%%il' end='\\%%%il' contains=@nmShowMsgDesc" % [msg.start, msg.start + 1]) + VIM::command("syntax region nmShowMsg#{i}Head start='\\%%%il' end='\\%%%il' contains=@nmShowMsgHead" % [msg.start + 1, msg.body_start]) + VIM::command("syntax region nmShowMsg#{i}Body start='\\%%%il' end='\\%%%dl' contains=@nmShowMsgBody" % [msg.body_start, msg.end]) ++ VIM::command("syntax region nmShowMsg#{i}Fold start='\\%%%il' end='\\%%%dl' contains=nmShowMsg#{i}Body,nmShowMsg#{i}Head,nmShowMsg#{i}Desc fold" % [msg.start, msg.end]) + end ++ VIM::command("g/^.*(.*unread.*)$/normal zo") ++ VIM::command("nohl") ++ VIM::command("normal gg/unread/1") + EOF ++ set foldmethod=syntax + setlocal nomodifiable + call s:set_map(g:notmuch_show_maps) + endfunction +@@ -957,5 +962,6 @@ EOF + endfunction + + command -nargs=* NotMuch call s:NotMuch() ++set foldtext=v:folddashes.substitute(getline(v:foldstart),'{{{','','g') + + " vim: set noexpandtab: +-- +1.9.3 (Apple Git-50) + -- 2.26.2