Prevent SyntaxError: unqualified exec is not allowed in function 'vim_calc'
it contains a nested function with free variables.
The problem is that ''.join('\\x%02x' % ord(x) for x in str(_))
creates a generator.
if result != None:
print(result)
_ = result
if result != None:
print(result)
_ = result
- xx = ''.join('\\x%02x' % ord(x) for x in str(_))
+ xx = ''.join(['\\x%02x' % ord(x) for x in str(_)])
vim.command('let @" = "%s"' % xx)
def vim_pydo(command):
vim.command('let @" = "%s"' % xx)
def vim_pydo(command):