make indenting with tabs work better
--HG-- branch : pmacs2
This commit is contained in:
parent
dd37bf139b
commit
7dac9a1984
|
@ -99,7 +99,9 @@ class GetToken(Method):
|
|||
if token is None:
|
||||
w.set_error('No Token')
|
||||
else:
|
||||
w.set_error('Token: %r (%s)' % (token.string, token.fqname()))
|
||||
# HACK: fix up our internal tab representation
|
||||
s = regex.internal_tab.sub('\t', token.string)
|
||||
w.set_error('Token: %s (%s)' % (repr(s)[1:], token.fqname()))
|
||||
|
||||
class TokenComplete(Method):
|
||||
'''Complete token names based on other tokens in the buffer'''
|
||||
|
|
9
regex.py
9
regex.py
|
@ -16,11 +16,12 @@ meta_chars = re.compile(r'([\.\^\$\*\+\?\{\}\(\)\[\]\|\"\'\\,])')
|
|||
shell_command = re.compile(r'^[^ ]+')
|
||||
|
||||
# whitespace regexes
|
||||
leading_whitespace = re.compile('^ *')
|
||||
trailing_whitespace = re.compile(' *$')
|
||||
whitespace = re.compile(r'^[ \n]*$')
|
||||
leading_whitespace = re.compile('^[ \t]*')
|
||||
trailing_whitespace = re.compile(r'[ \t]*$')
|
||||
whitespace = re.compile(r'^[ \t\n]*$')
|
||||
space = re.compile('^ *$')
|
||||
leading_whitespace2 = re.compile('^( *?)(.*?)\n?$')
|
||||
leading_whitespace2 = re.compile(r'^([ \t]*?)(.*?)\n?$')
|
||||
internal_tab = re.compile(r'\t *\t')
|
||||
|
||||
# word regexes
|
||||
word = re.compile('^[A-Za-z0-9_]+$')
|
||||
|
|
Loading…
Reference in New Issue