We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f66ba8 commit eee7049Copy full SHA for eee7049
plugin/python/vdebug/util.py
@@ -55,7 +55,18 @@ def unmap(self):
55
for mapping in self.existing:
56
vdebug.log.Log("Remapping key with '%s' " % mapping,\
57
vdebug.log.Logger.DEBUG)
58
- vim.command("noremap %s" % mapping)
+ regex = re.compile(r'\s+')
59
+ parts = regex.split(mapping)
60
+ mapcmd = 'noremap'
61
+ if len(parts)>2:
62
+ modeRegex = re.compile(r'^[nvsxoilc!]$')
63
+ if modeRegex.match(parts[0]):
64
+ mapping = ' '.join(parts[1:])
65
+ if parts[0]=='!':
66
+ mapcmd = 'noremap!'
67
+ else:
68
+ mapcmd = '%snoremap' % parts[0]
69
+ vim.command("%s %s" % (mapcmd,mapping))
70
71
class FilePath:
72
is_win = False
0 commit comments