Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug: Remapping won't work for mappings of single modes. See ':h m…

…ap-listing' for more info.
  • Loading branch information...
commit c93985482c8b14148e7062713b08dba7a31eb376 1 parent 699ab0e
@xbot xbot authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 plugin/python/vdebug/util.py
View
13 plugin/python/vdebug/util.py
@@ -55,7 +55,18 @@ def unmap(self):
for mapping in self.existing:
vdebug.log.Log("Remapping key with '%s' " % mapping,\
vdebug.log.Logger.DEBUG)
- vim.command("noremap %s" % mapping)
+ regex = re.compile(r'\s+')
+ parts = regex.split(mapping)
+ mapcmd = 'noremap'
+ if len(parts)>2:
+ modeRegex = re.compile(r'^[nvsxoilc!]$')
+ if modeRegex.match(parts[0]):
+ mapping = ' '.join(parts[1:])
+ if parts[0]=='!':
+ mapcmd = 'noremap!'
+ else:
+ mapcmd = '%snoremap' % parts[0]
+ vim.command("%s %s" % (mapcmd,mapping))
class FilePath:
is_win = False
Please sign in to comment.
Something went wrong with that request. Please try again.