diff --git a/PySnippets/all.snippets b/PySnippets/all.snippets index b8da990..649d1b1 100644 --- a/PySnippets/all.snippets +++ b/PySnippets/all.snippets @@ -1 +1,44 @@ # This is a comment, don't read it + +snippet mfg +Mit freundlichen Grüßen, +Holger Rapp +$0 +endsnippet + +snippet lg +Liebe Grüße, +Holger +$0 +endsnippet + +snippet vg +Viele Grüße, +Holger +$0 +endsnippet + +snippet sig +---------------------------------------- +Dipl.-Phys. Holger Rapp + +Institut für Mess- und Regelungstechnik +Universität Karlsruhe (TH) +Engler-Bunte-Ring 21 +76131 Karlsruhe, Germany +Geb. 40.32, Zi. 232, zweite Etage + +Tel: +49 (0)721 / 608-2341 +Fax: +49 (0)721 / 661874 +Mail: Rapp@mrt.uka.de +Web: www.mrt.uni-karlsruhe.de +---------------------------------------- +$0 +endsnippet + +snippet snip +------------------- SNIP ------------------- +$0 +------------------- SNAP ------------------- +endsnippet + diff --git a/plugin/PySnipEmu.py b/plugin/PySnipEmu.py index 0f2d694..b980c14 100644 --- a/plugin/PySnipEmu.py +++ b/plugin/PySnipEmu.py @@ -890,8 +890,6 @@ class SnippetManager(object): if not is_inside: self._current_snippets.pop() - # TODO: check if we left the current snippet - if not self._accept_input: return diff --git a/test.py b/test.py index 471d6a0..2ec9f41 100755 --- a/test.py +++ b/test.py @@ -509,9 +509,14 @@ class IMMoving_ExitWhenOutsideLeft_ECR(_VimTest): snippets = ("test", r"${1:Hi} ${2:blub}") keys = "hello test this" + ESC + "02f i\ttab" + 4*ARR_L + "\thallo" wanted = "hellohallo tab blub this" - -# TODO: exit when below or above snippet -# TODO: single line snippet insertions always adds newline +class IMMoving_ExitWhenOutsideAbove_ECR(_VimTest): + snippets = ("test", "${1:Hi}\n${2:blub}") + keys = "hello test this" + ESC + "02f i\ttab" + 1*ARR_U + "\t\nhallo" + wanted = "hallo\nhello tab\nblub this" +class IMMoving_ExitWhenOutsideBelow_ECR(_VimTest): + snippets = ("test", "${1:Hi}\n${2:blub}") + keys = "hello test this" + ESC + "02f i\ttab" + 2*ARR_D + "\ttesthallo\n" + wanted = "hello tab\nblub this\ntesthallo" #################### # PROPER INDENTING #