From 8e7e455f4327317fe711f086fbf315698324df30 Mon Sep 17 00:00:00 2001
From: Andrew Fowlie <andrew.j.fowlie@qq.com>
Date: Wed, 16 Jan 2019 15:11:59 +0800
Subject: add snippet to toggle comment/uncomment

---
 plugins/snippets/data/python.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'plugins/snippets/data')

diff --git a/plugins/snippets/data/python.xml b/plugins/snippets/data/python.xml
index 3829c3a0..14fc1b4e 100644
--- a/plugins/snippets/data/python.xml
+++ b/plugins/snippets/data/python.xml
@@ -109,4 +109,15 @@ $0]]></text>
     <description>main</description>
     <tag>main</tag>
   </snippet>
+
+  <snippet id="Toggle comments">
+    <text><![CDATA[$<
+from snippets import toggle_lines
+lines = $PLUMA_SELECTED_TEXT or $PLUMA_CURRENT_LINE
+return toggle_lines(lines, comment="#", after_leading_space=True, comment_empty=False)
+>]]></text>
+    <description>Toggle comment</description>
+    <accelerator><![CDATA[<Primary>m]]></accelerator>
+  </snippet>
+
 </snippets>
-- 
cgit v1.2.1