Skip to content

Instantly share code, notes, and snippets.

@dyng
Created December 4, 2012 00:42
Show Gist options
  • Save dyng/4199450 to your computer and use it in GitHub Desktop.
Save dyng/4199450 to your computer and use it in GitHub Desktop.
vim光标位置的备份和恢复
(line_bak, col_bak) = (vim.eval("line('.')"), vim.eval("col('.')"))
"""
do something
"""
vim.command("call cursor('{0}', '{1}')".format(line_bak, col_bak))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment