Snippets are now dropped when cursor reached /bin/zsh
This commit is contained in:
parent
892db435f0
commit
d8cd3f3d08
@ -10,6 +10,10 @@ ${0}
|
|||||||
% section $1 (end)
|
% section $1 (end)
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet r "\ref{}"
|
||||||
|
\ref{$1}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# TEXTMATE SNIPPETS #
|
# TEXTMATE SNIPPETS #
|
||||||
#####################
|
#####################
|
||||||
|
@ -548,8 +548,7 @@ class SnippetInstance(TextObject):
|
|||||||
|
|
||||||
def select_next_tab(self, backwards = False):
|
def select_next_tab(self, backwards = False):
|
||||||
if self._cts == 0:
|
if self._cts == 0:
|
||||||
if not backwards:
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
if backwards:
|
if backwards:
|
||||||
cts_bf = self._cts
|
cts_bf = self._cts
|
||||||
@ -577,7 +576,7 @@ class SnippetInstance(TextObject):
|
|||||||
ts.select(self._start)
|
ts.select(self._start)
|
||||||
|
|
||||||
self._tab_selected = True
|
self._tab_selected = True
|
||||||
return True
|
return self._cts
|
||||||
|
|
||||||
def backspace(self,count, previous_cp):
|
def backspace(self,count, previous_cp):
|
||||||
cts = self._tabstops[self._cts]
|
cts = self._tabstops[self._cts]
|
||||||
|
4
test.py
4
test.py
@ -179,11 +179,11 @@ class TestJumpingDontJumpToEndIfThereIsTabZero_ExceptCorrectResult(_VimTest):
|
|||||||
wanted = "hallo Hidu Test"
|
wanted = "hallo Hidu Test"
|
||||||
|
|
||||||
class TabStopTestBackwardJumping_ExceptCorrectResult(_VimTest):
|
class TabStopTestBackwardJumping_ExceptCorrectResult(_VimTest):
|
||||||
snippets = ("hallo", "hallo ${0:End} mitte${1:Beginning}")
|
snippets = ("hallo", "hallo ${2:End} mitte${1:Beginning}")
|
||||||
keys = "hallo\tSomelengthy Text\tHi+Lets replace it again\tBlah\t++\t"
|
keys = "hallo\tSomelengthy Text\tHi+Lets replace it again\tBlah\t++\t"
|
||||||
wanted = "hallo Blah mitteLets replace it again"
|
wanted = "hallo Blah mitteLets replace it again"
|
||||||
class TabStopTestBackwardJumping2_ExceptCorrectResult(_VimTest):
|
class TabStopTestBackwardJumping2_ExceptCorrectResult(_VimTest):
|
||||||
snippets = ("hallo", "hallo $0 $1")
|
snippets = ("hallo", "hallo $2 $1")
|
||||||
keys = "hallo\tSomelengthy Text\tHi+Lets replace it again\tBlah\t++\t"
|
keys = "hallo\tSomelengthy Text\tHi+Lets replace it again\tBlah\t++\t"
|
||||||
wanted = "hallo Blah Lets replace it again"
|
wanted = "hallo Blah Lets replace it again"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user